Skip to content

chore(deps): bump the go_modules group across 1 directory with 2 updates #108

chore(deps): bump the go_modules group across 1 directory with 2 updates

chore(deps): bump the go_modules group across 1 directory with 2 updates #108

---
name: unified-workflow
on:
# manual trigger
workflow_dispatch:
# push or merge to master
push:
branches:
- master
# pull request targeting master branch created or updated
pull_request:
branches:
- master
permissions:
contents: write
packages: write
attestations: write
id-token: write
actions: read
jobs:
golangci-lint:
if: github.event_name == 'workflow_dispatch' || !endsWith(github.actor, '[bot]')
uses: ./.github/workflows/110-golangci-lint.yaml
with:
runs_on: ubuntu-latest
continue_on_error: true
docker-lint:
if: github.event_name == 'workflow_dispatch' || !endsWith(github.actor, '[bot]')
uses: ./.github/workflows/110-docker-lint.yaml
with:
runs_on: ubuntu-latest
continue_on_error: true
unit-tests:
uses: ./.github/workflows/120-unit-tests.yaml
needs:
- golangci-lint
- docker-lint
with:
runs_on: ubuntu-latest
continue_on_error: true
# since we are using ref name as image tag, we need to prepare it first
# because it may contain characters that are not allowed in docker image tags
docker-prepare-tag:
runs-on: ubuntu-latest
needs:
- unit-tests
outputs:
tag: ${{ steps.docker-prepare-tag.outputs.tag }}
steps:
- name: Prepare Docker image tag
id: docker-prepare-tag
run: |
REF_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}"
IMAGE_TAG=$(echo "$REF_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[\/ @]/-/g')
IMAGE_TAG="${IMAGE_TAG:0:60}-${GITHUB_RUN_ID}"
echo "tag=$IMAGE_TAG" >> "$GITHUB_OUTPUT"
echo "$IMAGE_TAG"
docker-build:
uses: ./.github/workflows/140-docker-build.yaml
needs:
- docker-prepare-tag
with:
runs_on: ubuntu-latest
continue_on_error: false
service_name: "commit"
image_tag: ${{ needs.docker-prepare-tag.outputs.tag }}
platforms: "linux/amd64,linux/arm64"
attestation: ${{ github.ref == 'refs/heads/master' }}
generate_sbom: true
attestation_sbom: false
cleanup:
uses: ./.github/workflows/160-cleanup.yaml
needs:
- docker-prepare-tag
- docker-build
with:
runs_on: ubuntu-latest
service_name: "commit"
image_tag: ${{ needs.docker-prepare-tag.outputs.tag }}