File tree 1 file changed +47
-0
lines changed
1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : paybc-build-and-push-dev
2
+
3
+ on :
4
+ push :
5
+ branches : [new-namespace]
6
+ paths :
7
+ - python/*.py
8
+ - python/common/**
9
+ - python/paybc_api/**
10
+ - .github/workflows/build-push-paybc.yaml
11
+ - trigger.txt
12
+ workflow_dispatch :
13
+
14
+ env :
15
+ IMAGE_NAME : paybc
16
+ WORKING_DIRECTORY : ./python
17
+ REPO_KEY : af03
18
+
19
+ jobs :
20
+ build :
21
+ runs-on : ubuntu-latest
22
+
23
+ steps :
24
+ - uses : actions/checkout@v3
25
+
26
+ - name : Login to Artifactory
27
+ uses : docker/login-action@v1
28
+ with :
29
+ registry : artifacts.developer.gov.bc.ca
30
+ username : ${{ secrets.ARTIFACTORY_USERNAME }}
31
+ password : ${{ secrets.ARTIFACTORY_PASSWORD }}
32
+
33
+ # Get SHORT_SHA for the version
34
+ - name : Get short SHA
35
+ id : short_sha
36
+ run : |
37
+ echo "::set-output name=SHORT_SHA::$(git rev-parse --short HEAD)"
38
+ echo "Short SHA: $SHORT_SHA"
39
+
40
+ - name : Build Image
41
+ working-directory : ${{env.WORKING_DIRECTORY}}
42
+ run : |
43
+ docker build -t artifacts.developer.gov.bc.ca/${{env.REPO_KEY}}-${{env.IMAGE_NAME}}/${{env.IMAGE_NAME}}:dev -f paybc_api/Dockerfile .
44
+
45
+ - name : Docker Push to Artifactory
46
+ run : |
47
+ docker push artifacts.developer.gov.bc.ca/${{env.REPO_KEY}}-${{env.IMAGE_NAME}}/${{env.IMAGE_NAME}}:dev
You can’t perform that action at this time.
0 commit comments