Skip to content

Commit d86c8d5

Browse files
committed
ci: add check owner step and add build args when build dockerfile
1 parent c0d7ee3 commit d86c8d5

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

‎.github/workflows/CI_master_push.yaml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@ env:
1616
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
1717

1818
jobs:
19+
owner_check:
20+
if: github.repository_owner == 'Atable-Lab'
21+
runs-on: ubuntu-latest
22+
steps:
23+
- run: echo ${{ github.repository_owner }}
1924
build:
25+
if: github.repository_owner == 'Atable-Lab'
2026
runs-on: ubuntu-latest
27+
needs: owner_check
2128
steps:
2229
- uses: actions/checkout@v3
2330
- name: Get service name
@@ -37,6 +44,10 @@ jobs:
3744
file: ./Dockerfile
3845
push: true
3946
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.SERVICE }}:latest
47+
build-args: |
48+
ATABLE_LAB_MONGO_DB_HOST=${{ secrets.ATABLE_LAB_MONGO_DB_HOST }}
49+
ATABLE_LAB_MONGO_DB_ID=${{ secrets.ATABLE_LAB_MONGO_DB_ID }}
50+
ATABLE_LAB_MONGO_DB_PASSWORD=${{ secrets.ATABLE_LAB_MONGO_DB_PASSWORD }}
4051
4152
- name: Upload Docker Image with Tag
4253
uses: docker/build-push-action@v2

‎.gitignore‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ venv/
1010
ENV/
1111

1212
# Pycharm
13-
.idea/
13+
.idea/
14+
15+
*.sh

0 commit comments

Comments
 (0)