Update actions versions #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
docker-push: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Tag and SHA | |
run: | | |
CLEAN_TAG=$(echo "${{ github.event.pull_request.head.ref }}" | tr / -) | |
echo "TAG=$CLEAN_TAG" >> $GITHUB_ENV | |
echo "SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV | |
- name: Build | |
run: > | |
docker build -t ${{ secrets.GAR_LOCATION }}/${{ secrets.GAR_PROJECT_ID }}/docker-images/eq-runner-maintenance-page:$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 }} | |
echo "Pushing to GAR with tag $TAG" | |
docker push ${{ secrets.GAR_LOCATION }}/${{ secrets.GAR_PROJECT_ID }}/docker-images/eq-runner-maintenance-page:$TAG |