mirror of
https://github.com/element-hq/ess-helm.git
synced 2026-11-24 02:51:28 -08:00
Bumps the minor-and-patches group with 2 updates: [docker/bake-action](https://github.com/docker/bake-action) and [streetsidesoftware/cspell-action](https://github.com/streetsidesoftware/cspell-action). Updates `docker/bake-action` from 7.0.0 to 7.1.0 - [Release notes](https://github.com/docker/bake-action/releases) - [Commits](https://github.com/docker/bake-action/compare/82490499d2e5613fcead7e128237ef0b0ea210f7...a66e1c87e2eca0503c343edf1d208c716d54b8a8) Updates `streetsidesoftware/cspell-action` from 8.3.0 to 8.4.0 - [Release notes](https://github.com/streetsidesoftware/cspell-action/releases) - [Changelog](https://github.com/streetsidesoftware/cspell-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell-action/compare/9cd41bb518a24fefdafd9880cbab8f0ceba04d28...de2a73e963e7443969755b648a1008f77033c5b2) --- updated-dependencies: - dependency-name: docker/bake-action dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patches - dependency-name: streetsidesoftware/cspell-action dependency-version: 8.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patches ... Signed-off-by: dependabot[bot] <[email protected]>
134 lines
4.0 KiB
YAML
134 lines
4.0 KiB
YAML
# 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@4a3601121dd01d1626a1e23e37211e3254c1c06c # 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@4a3601121dd01d1626a1e23e37211e3254c1c06c # 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@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.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@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.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' }}
|