Skip to content

Commit

Permalink
Update push action
Browse files Browse the repository at this point in the history
  • Loading branch information
MebinAbraham committed Dec 14, 2023
1 parent dbf3b2e commit 13d9f5f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set Tag and SHA
run: |
echo "TAG=tiles-schema-dev" >> $GITHUB_ENV
- name: Write app version
run: printf "$GITHUB_SHA" > .application-version
- name: Build
run: >
docker build -t onsdigital/eq-questionnaire-runner:tiles-schema-dev .
docker build -t onsdigital/eq-questionnaire-runner:$TAG
-t ${{ secrets.GAR_LOCATION }}/${{ secrets.GAR_PROJECT_ID }}/docker-images/eq-questionnaire-runner:$TAG .
- name: Push to GAR
env:
GAR_SERVICE_KEY: ${{ secrets.GAR_SERVICE_KEY }}
run: |
echo $GAR_SERVICE_KEY | docker login -u _json_key --password-stdin https://${{ secrets.GAR_LOCATION }}
gcloud auth configure-docker ${{ secrets.GAR_LOCATION }}
TAG=tiles-schema-dev
echo "Pushing to GAR with tag $TAG"
docker push ${{ secrets.GAR_LOCATION }}/${{ secrets.GAR_PROJECT_ID }}/docker-images/eq-questionnaire-runner:$TAG

0 comments on commit 13d9f5f

Please sign in to comment.