Skip to content

chore(deps): lock file maintenance (#61) #146

chore(deps): lock file maintenance (#61)

chore(deps): lock file maintenance (#61) #146

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@v11
- uses: DeterminateSystems/magic-nix-cache-action@v6
- run: nix flake check
gomod2nix:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'mirkolenz' && github.event_name == 'push' }}
outputs:
git-head: ${{ steps.git-head.outputs.git-head }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: fregante/setup-git-user@v2
- uses: DeterminateSystems/nix-installer-action@v11
- uses: DeterminateSystems/magic-nix-cache-action@v6
- run: |
nix run .#gomod2nix
if [ -n "$(git status --porcelain)" ]; then
git add gomod2nix.toml
git commit -m "chore(deps): update gomod2nix"
git push
fi
- run: echo "git-head=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
id: git-head
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@v11
with:
extra-conf: |
extra-platforms = aarch64-linux
- uses: DeterminateSystems/magic-nix-cache-action@v6
- run: nix profile install .#releaseEnv
- 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 }}