mirror of
https://github.com/element-hq/ess-helm.git
synced 2026-11-24 11:01:33 -08:00
Bumps the minor-and-patches group with 2 updates: [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) and [docker/login-action](https://github.com/docker/login-action). Updates `astral-sh/setup-uv` from 8.2.0 to 8.3.2 - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/fac544c07dec837d0ccb6301d7b5580bf5edae39...11f9893b081a58869d3b5fccaea48c9e9e46f990) Updates `docker/login-action` from 4.3.0 to 4.4.0 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/c99871dec2022cc055c062a10cc1a1310835ceb4...af1e73f918a031802d376d3c8bbc3fe56130a9b0) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 8.3.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patches - dependency-name: docker/login-action dependency-version: 4.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.26"
|
||
|
||
jobs:
|
||
gofmt:
|
||
permissions:
|
||
contents: read
|
||
packages: read
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||
with:
|
||
persist-credentials: false
|
||
|
||
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # 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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||
with:
|
||
persist-credentials: false
|
||
|
||
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6
|
||
with:
|
||
go-version: "${{ env.GO_VERSION }}"
|
||
|
||
- uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # 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@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
|
||
|
||
- name: Checkout Repository
|
||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||
with:
|
||
persist-credentials: false
|
||
|
||
- name: Login to GHCR
|
||
if: ${{ github.ref_type == 'tag' }}
|
||
uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.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@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.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@d3418bd7d0e9324001bca92fa8ba175ea7e6dc9b # v7.3.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' }}
|