build(deps): bump DeterminateSystems/magic-nix-cache-action from 7 to 8 #490
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
name: "Build and Deploy" | |
on: | |
push: | |
env: | |
HOST: morak.sumnerevans.com | |
GHCR_REGISTRY: ghcr.io | |
GHCR_REGISTRY_IMAGE: "ghcr.io/coloradoschoolofmines/mineshspc.com" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
- name: Install dependencies | |
run: | | |
go install golang.org/x/tools/cmd/goimports@latest | |
go install honnef.co/go/tools/cmd/staticcheck@latest | |
export PATH="$HOME/go/bin:$PATH" | |
- name: Run pre-commit | |
uses: pre-commit/action@v3.0.1 | |
- uses: DeterminateSystems/nix-installer-action@v13 | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- run: nix flake check | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
- run: go build ./cmd/mineshspc | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: mineshspc | |
path: mineshspc | |
build-nix: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v13 | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- run: nix build | |
submit-hash-update-pr: | |
runs-on: ubuntu-latest | |
needs: | |
- lint | |
- build | |
- build-nix | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: nevarro-space/infrastructure | |
- uses: DeterminateSystems/nix-installer-action@v13 | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Update the mineshspc input | |
run: | | |
nix flake lock --update-input mineshspc | |
- name: Create PR against Nevarro's infrastructure repository | |
id: cpr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.PR_CREATOR_TOKEN }} | |
commit-message: "mineshspc.com: update to ${{ github.sha }}" | |
title: "mineshspc.com: update to ${{ github.sha }}" | |
author: "Nevarro Bot <nevarro-bot@users.noreply.github.com>" | |
body: | | |
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action in the [mineshspc.com](https://github.com/ColoradoSchoolOfMines/mineshspc.com) repository. | |
**Changes:** https://github.com/ColoradoSchoolOfMines/mineshspc.com/commits/${{ github.sha }} | |
branch: update-mineshspc | |
delete-branch: true | |
reviewers: sumnerevans | |
- name: Check outputs | |
if: ${{ steps.cpr.outputs.pull-request-number }} | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |