chore(docker): bump google/cloud-sdk from 502.0.0-alpine to 503.0.0-a… #269
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: Publish | |
"on": | |
push: | |
branches: | |
- "master" | |
tags: | |
- "v*" | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write | |
if: ${{ github.actor != 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }} | |
env: | |
IMAGE_NAME: docker.io/tungbeier/gcloud-pubsub-emulator | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
${{ env.IMAGE_NAME }} | |
flavor: | | |
latest=auto | |
tags: | | |
type=semver,pattern={{version}} | |
type=raw,value=latest,enable={{is_default_branch}} | |
labels: | | |
org.opencontainers.image.vendor=tungbeier | |
[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push Docker images | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Scan image | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: '${{ env.IMAGE_NAME }}:latest' | |
format: 'sarif' | |
output: 'trivy-results.sarif' | |
- name: Upload scan results to GitHub Security tab | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: 'trivy-results.sarif' |