Skip to content

test

test #30

Workflow file for this run

name: test
permissions:
contents: read
id-token: write
packages: write
on:
workflow_dispatch:
env:
WORKLOAD_NAME: my-sample-workload
IMAGE_NAME: ${{ secrets.REGISTRY_LOCATION }}-docker.pkg.dev/${{ secrets.PROJECT_ID }}/${{ secrets.REGISTRY_NAME }}/my-sample-workload
jobs:
test:
runs-on: ubuntu-24.04
steps:
- name: checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: authenticate to google cloud
uses: google-github-actions/auth@v2
with:
workload_identity_provider: '${{ secrets.WI_PROVIDER_ID }}'
service_account: '${{ secrets.GSA_ID }}'
- name: install gcloud
uses: google-github-actions/setup-gcloud@v2
with:
version: latest
- name: sign-in to gar
run: |
gcloud auth configure-docker \
${{ secrets.REGISTRY_LOCATION }}-docker.pkg.dev \
--quiet
- name: login to ghcr
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login \
ghcr.io \
-u $ \
--password-stdin
- name: Build and push
uses: docker/build-push-action@v6
with:
context: app/
platforms: linux/amd64,linux/arm64
push: true
tags: "${{ env.IMAGE_NAME }}:test,ghcr.io/${{ github.repository_owner }}/${{ env.WORKLOAD_NAME }}:test"