chore(deps): update determinatesystems/magic-nix-cache-action action … #249
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@v16 | |
- uses: DeterminateSystems/magic-nix-cache-action@v9 | |
- run: nix flake check --show-trace | |
gomod2nix: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' }} | |
outputs: | |
git-head: ${{ steps.commit.outputs.commit_hash || github.sha }} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
- uses: DeterminateSystems/magic-nix-cache-action@v9 | |
- run: nix run .#gomod2nix | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
id: commit | |
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@v16 | |
with: | |
extra-conf: | | |
extra-platforms = aarch64-linux | |
- uses: DeterminateSystems/magic-nix-cache-action@v9 | |
- run: nix profile install .#release-env | |
- run: gomod2nix | |
- uses: cihelper/action-semanticrelease-goreleaser@v1 | |
id: semanticrelease | |
- run: nix run .#docker-manifest --impure | |
if: ${{ steps.semanticrelease.outputs.released == 'true' }} | |
env: | |
VERSION: ${{ steps.semanticrelease.outputs.version }} | |
GH_TOKEN: ${{ github.token }} |