Skip to content

add temporary trigger that is not workflow_run (which can only happen… #1

add temporary trigger that is not workflow_run (which can only happen…

add temporary trigger that is not workflow_run (which can only happen… #1

Workflow file for this run

name: CD
on:
push:
branches: [add-cd-full] # Temporary trigger
workflow_run:
workflows: [CI]
branches: [master]
types:
- completed
env:
GO_VERSION: ^1.21.5
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
TAG: sha-${{ github.sha }}
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: "read"
packages: write
id-token: "write"
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull image
run: docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Tag image as latest
run: docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
- name: Push latest image
run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
- name: Log into Google Cloud Platform
uses: "google-github-actions/auth@v2"
with:
project_id: "go-modproxy"
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
- name: "Set up Google Cloud SDK"
uses: "google-github-actions/setup-gcloud@v2"
with:
version: ">= 461.0.0"