Skip to content

fix: use bridge3 in cd #4

fix: use bridge3 in cd

fix: use bridge3 in cd #4

Workflow file for this run

name: Create and Push Docker Image
on:
push:
tags:
- "v[0-9]+\\.[0-9]+\\.[0-9]+"
- "v[0-9]+\\.[0-9]+\\.[0-9]+-*"
env:
GCP_GAR_REPOSITORY: ${{ vars.GCP_GAR_REPOSITORY }}
GCP_REGION: ${{ vars.GCP_REGION }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Check out code
uses: actions/checkout@v5
- name: Authenticate to GCP
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Configure Docker to use gcloud as a credential helper
run: |
gcloud auth configure-docker $GCP_REGION-docker.pkg.dev
- name: Extract tag name
id: tag
run: |
GIT_TAG=$(echo "$GITHUB_REF" | sed 's|refs/tags/v||')
echo "TAG_NAME=$GIT_TAG" >> $GITHUB_OUTPUT
- name: Build Docker image
run: |
docker build -f ./docker/Dockerfile.bridge3 -t ton-bridge:${{ steps.tag.outputs.TAG_NAME }} .
- name: Tag Docker image for GAR
run: |
docker tag ton-bridge:${{ steps.tag.outputs.TAG_NAME }} $GCP_GAR_REPOSITORY/ton-bridge:${{ steps.tag.outputs.TAG_NAME }}
- name: Push Docker image to GAR (with version tag)
run: |
docker push $GCP_GAR_REPOSITORY/ton-bridge:${{ steps.tag.outputs.TAG_NAME }}