Skip to content

ci: update gomod2nix job #201

ci: update gomod2nix job

ci: update gomod2nix job #201

Workflow file for this run

on:
pull_request:
push:
branches:
- main
- beta
jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v14
- uses: DeterminateSystems/magic-nix-cache-action@v8
- run: nix flake check --show-trace
gomod2nix:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'mirkolenz' && github.event_name == 'push' }}
outputs:
git-head: ${{ steps.git-push.outputs.head-sha }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v14
- uses: DeterminateSystems/magic-nix-cache-action@v8
- run: nix run .#gomod2nix
- uses: cihelper/action-git-push@v1
id: git-push
with:
commit-message: "chore(deps): update gomod2nix"
release:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'mirkolenz' && github.event_name == 'push' }}
needs: [check, gomod2nix]
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.gomod2nix.outputs.git-head }}
- uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- uses: DeterminateSystems/nix-installer-action@v14
with:
extra-conf: |
extra-platforms = aarch64-linux
- uses: DeterminateSystems/magic-nix-cache-action@v8
- run: nix profile install .#release-env
- run: gomod2nix
- uses: cihelper/action-semanticrelease-goreleaser@v1
id: semanticrelease
- run: nix run .#dockerManifest --impure
if: ${{ steps.semanticrelease.outputs.released == 'true' }}
env:
VERSION: ${{ steps.semanticrelease.outputs.version }}
GH_TOKEN: ${{ github.token }}