Bump azure/setup-helm from 4.3.1 to 5.0.0 #4378
Workflow file for this run
This file contains hidden or 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
| # Copyright 2025 New Vector Ltd | |
| # Copyright 2025-2026 Element Creations Ltd | |
| # | |
| # SPDX-License-Identifier: AGPL-3.0-only | |
| name: matrix-tools linting and building | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - 'maintenance/*' | |
| tags: | |
| - 'matrix-tools-*' | |
| workflow_dispatch: | |
| env: | |
| REGISTRY_IMAGE: ghcr.io/${{ github.repository }}/matrix-tools | |
| GO_VERSION: "1.25" | |
| jobs: | |
| gofmt: | |
| permissions: | |
| contents: read | |
| packages: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 | |
| with: | |
| go-version: "${{ env.GO_VERSION }}" | |
| - name: gofmt check | |
| run: | | |
| unformatted_files="$(gofmt -l matrix-tools)" | |
| if [ "$unformatted_files" != "" ]; then | |
| echo "There are .go files that aren't formatted correctly:" | |
| echo "$unformatted_files" | |
| exit 1 | |
| fi | |
| tests: | |
| permissions: | |
| contents: read | |
| packages: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 | |
| with: | |
| go-version: "${{ env.GO_VERSION }}" | |
| - uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9 | |
| with: | |
| working-directory: matrix-tools | |
| args: -v --show-stats --no-config --modules-download-mode readonly | |
| - uses: GoTestTools/gotestfmt-action@7dd37bbcc925453b6d7465164cf3bcbd87bc691d # v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run tests | |
| run: cd matrix-tools && go test -v -json ./... 2>&1 | gotestfmt | |
| # Build our application docker images in parallel. | |
| docker-build-and-push: | |
| permissions: | |
| contents: read | |
| packages: write | |
| name: Build matrix-tools container image | |
| needs: | |
| - tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 | |
| - name: Checkout Repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Login to GHCR | |
| if: ${{ github.ref_type == 'tag' }} | |
| uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Get Release Tag | |
| if: github.ref_type == 'tag' # Only for GitHub releases | |
| run: | | |
| echo "Converting $GITHUB_REF to tags" | |
| echo "VERSION=${GITHUB_REF#refs\/tags\/matrix-tools-}" >> "$GITHUB_ENV" | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0 | |
| with: | |
| images: | | |
| ${{ env.REGISTRY_IMAGE }} | |
| flavor: | | |
| latest=false | |
| tags: | | |
| type=raw,value=${{ env.VERSION }},enable=${{ github.ref_type == 'tag' }} | |
| type=sha,prefix=sha-,format=short | |
| labels: | | |
| org.opencontainers.image.licenses=AGPL-3.0-only | |
| annotations: | | |
| org.opencontainers.image.licenses=AGPL-3.0-only | |
| - name: Build and Push Image | |
| uses: docker/bake-action@82490499d2e5613fcead7e128237ef0b0ea210f7 # v7.0.0 | |
| with: | |
| push: ${{ github.ref_type == 'tag' }} | |
| files: | | |
| docker-bake.hcl | |
| cwd://${{ steps.meta.outputs.bake-file }} | |
| targets: matrix-tools | |
| set: | | |
| *.platform=linux/amd64,linux/arm64 | |
| # https://docs.zizmor.sh/audits/#cache-poisoning | |
| # This is not catched by zizmor but arguably we need to disable cache for docker builds | |
| # See related issue https://github.com/zizmorcore/zizmor/issues/774 | |
| no-cache: ${{ github.ref_type == 'tag' }} |