Fix err113 config in golanglint-ci #46
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: ci | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
workflow_dispatch: | |
env: | |
PRIVATE_REGISTRY_HOST: us-central1-docker.pkg.dev | |
PRIVATE_REGISTRY_URL: us-central1-docker.pkg.dev/buf-knit-demo-1/buf-knit-demo-1-knit-demo-registry | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
testlint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: setup-go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.23.x | |
- name: make-test | |
run: make test | |
- name: make-lint | |
run: make lint | |
docker-build-push-knit-demo: | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- id: auth | |
name: auth-to-gcp | |
uses: google-github-actions/auth@v1 | |
with: | |
token_format: 'access_token' | |
workload_identity_provider: projects/1057072778487/locations/global/workloadIdentityPools/knit-demo-ar-wif-pool/providers/knit-demo-ar-wif-provider | |
service_account: ar-writer-service-account@buf-knit-demo-1.iam.gserviceaccount.com | |
- name: login-gcr | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.PRIVATE_REGISTRY_HOST }} | |
username: oauth2accesstoken | |
password: ${{ steps.auth.outputs.access_token }} | |
- name: setup-docker-buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: build-push | |
uses: docker/build-push-action@v3 | |
with: | |
# By default, this action will pull the state from git. We want to use the local | |
# state with the modified files. | |
context: . | |
file: Dockerfile | |
push: true | |
tags: | | |
${{ env.PRIVATE_REGISTRY_URL }}/knit-demo:latest | |
${{ env.PRIVATE_REGISTRY_URL }}/knit-demo:${{ github.sha }} | |
- name: Set up Cloud SDK | |
uses: google-github-actions/setup-gcloud@v1 | |
- name: Update Cloud Run | |
run: gcloud run services update knit-demo-cloud-run --image=${{ env.PRIVATE_REGISTRY_URL }}/knit-demo:${{ github.sha }} --region us-central1 |