File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : QA-Prod
2+
3+ on :
4+ workflow_dispatch : # used for QA Deployments
5+ push : # used for Prod/Stg image building
6+ tags :
7+ - ' sandbox-*'
8+ - ' [0-9]+.[0-9]+.[0-9]+'
9+
10+ jobs :
11+ build :
12+ permissions :
13+ contents : read
14+ pull-requests : write
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v3
18+ - name : Set Docker Tag
19+ id : vars
20+ if : always()
21+ run : |
22+ REPOSITORY="sandbox-${GITHUB_REPOSITORY#*/}"
23+ echo ::set-output name=REPOSITORY::${REPOSITORY}
24+ if [[ ${{ github.ref }} == refs/tags* ]]; then
25+ TAG=${GITHUB_REF/refs\/tags\//}
26+ echo ::set-output name=TAG::${TAG}
27+ echo ::set-output name=TARGET::${{ secrets.SLACK_WEBHOOK_PROD }}
28+ else
29+ TAG=qa-${GITHUB_SHA::7}-$(date +%s)
30+ echo ::set-output name=TAG::${TAG}
31+ echo ::set-output name=TARGET::${{ secrets.SLACK_WEBHOOK }}
32+ fi
33+ - name : Build the Docker image
34+ env :
35+ LLC_ECR_HOST : ${{ secrets.LLC_ECR_HOST }}
36+ TAG : ${{ steps.vars.outputs.TAG }}
37+ REPOSITORY : ${{ steps.vars.outputs.REPOSITORY }}
38+ run : |
39+ docker build . --file Dockerfile --tag ${LLC_ECR_HOST}/$REPOSITORY:$TAG
40+ docker push ${LLC_ECR_HOST}/$REPOSITORY:$TAG
You can’t perform that action at this time.
0 commit comments