chore(deps): lock file maintenance #68
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v7 | |
- uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- 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@v7 | |
- uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- 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@v7 | |
with: | |
extra-conf: | | |
extra-platforms = aarch64-linux | |
- uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- 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 }} |