Skip to content

Tag trigger

Tag trigger #7

Workflow file for this run

---
name: CI/CD for socket-exporter
on:
push:
branches:
- "main"
tags:
- .*
pull_request:
branches:
- "main"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the project
run: |
make build
socket-exporter-build-dev:
uses: celo-org/reusable-workflows/.github/workflows/[email protected]
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/socket-exporter
needs: build
permissions:
contents: read
id-token: write
security-events: write
if: |
github.ref != 'refs/heads/main'
with:
workload-id-provider: 'projects/1094498259535/locations/global/workloadIdentityPools/gh-socket-exporter/providers/github-by-repos'
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/dev-images/socket-exporter
tags: test
context: .
file: ./Dockerfile
trivy: true
socket-exporter-build-main:
uses: celo-org/reusable-workflows/.github/workflows/[email protected]
name: Build us-west1-docker.pkg.dev/devopsre/socket-exporter/socket-exporter
needs: build
permissions:
contents: read
id-token: write
security-events: write
if: |
github.ref == 'refs/heads/main'
with:
workload-id-provider: 'projects/1094498259535/locations/global/workloadIdentityPools/gh-socket-exporter-main/providers/github-by-repos'
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/socket-exporter/socket-exporter
tags: latest
context: .
file: ./Dockerfile
trivy: true
socket-exporter-build-tag:
uses: celo-org/reusable-workflows/.github/workflows/[email protected]
name: Build us-west1-docker.pkg.dev/devopsre/socket-exporter/socket-exporter tag
needs: build
permissions:
contents: read
id-token: write
security-events: write
if: |
startsWith(github.ref, 'refs/tags/')
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-socket-exporter/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/socket-exporter/socket-exporter
tags: ${{ github.ref_name }}
context: .
file: ./Dockerfile
trivy: true