chore(deps): bump github/codeql-action from 3.27.3 to 3.27.4 (#529) #102
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: Build and push a Docker image to Google Cloud Platform (GCP) Registry | |
on: | |
push: | |
branches: | |
- master | |
- deploy-* | |
tags: | |
- v*.*.* | |
jobs: | |
cloud-build: | |
runs-on: ubuntu-latest | |
environment: prod | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '${{ vars.PYTHON_VERSION }}' | |
architecture: 'x64' | |
- name: Check release version | |
id: check-tag | |
run: | | |
echo "version=$(echo ${{ github.event.ref }} | cut -d / -f 3 | cut -c2-)" >> $GITHUB_OUTPUT | |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | |
echo "match=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Authenticate to GCP | |
id: authenticate | |
uses: google-github-actions/auth@v2 | |
with: | |
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} | |
- name: Set up Cloud SDK | |
uses: google-github-actions/setup-gcloud@v2 | |
with: | |
project_id: ${{ secrets.PROJECT_ID }} | |
- name: Build Docker container and publish on GCR | |
run: make cloud_build || true | |
env: | |
GCR_PROJECT_ID: ${{ secrets.GCR_PROJECT_ID }} | |
CLOUDBUILD_PROJECT_ID: ${{ secrets.CLOUDBUILD_PROJECT_ID }} | |
VERSION: ${{ steps.check-tag.outputs.match == 'true' && steps.check-tag.outputs.version || github.event.pull_request.head.sha || github.sha }} | |
PYTHON_VERSION: ${{ vars.PYTHON_VERSION }} | |
- name: Build Docker container and publish on GCR [latest] | |
run: make cloud_build || true | |
if: ${{ steps.check-tag.outputs.match == 'true' }} | |
env: | |
GCR_PROJECT_ID: ${{ secrets.GCR_PROJECT_ID }} | |
CLOUDBUILD_PROJECT_ID: ${{ secrets.CLOUDBUILD_PROJECT_ID }} | |
VERSION: latest | |
PYTHON_VERSION: ${{ vars.PYTHON_VERSION }} |