Skip to content

chore(deps): update golang to v1.26.2 #1372

chore(deps): update golang to v1.26.2

chore(deps): update golang to v1.26.2 #1372

Workflow file for this run

---
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
env:
# renovate: datasource=github-releases depName=golangci/golangci-lint versioning=semver-coerced
GOLANGCI_LINT_VERSION: "v2.2.2"
IMAGE: "ghcr.io/${{ github.repository }}"
REGISTRY: "ghcr.io"
TEST_TAG: "ghcr.io/${{ github.repository }}:test"
permissions:
contents: read
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: '0' # Required for go-header check to know correct mtime of files
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6
with:
go-version-file: 'go.mod'
- name: Run pre-commit
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
env:
SKIP: golangci-lint-full
- name: Run golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
- name: Run go tests
run: go test -v ./...
docker:
name: Docker
runs-on: ubuntu-latest
needs:
- 'tests'
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Log in to the Container registry
if: ${{ github.ref == 'refs/heads/main' }}
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build test image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
with:
load: true
tags: ${{ env.TEST_TAG }}
cache-from: type=gha
- name: Validate Container
id: validate
run: |
docker run --rm -i --entrypoint sh ${{ env.TEST_TAG }} < ci/validate.sh
- name: Extract metadata (tags, labels) for Docker
if: ${{ github.ref == 'refs/heads/main' }}
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5
with:
images: ${{ env.IMAGE }}
tags: type=raw,value=latest
- name: Build and push image
if: ${{ github.ref == 'refs/heads/main' }}
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
with:
cache-from: type=gha
cache-to: type=gha,mode=max
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}