Skip to content

build(deps): DeterminateSystems/magic-nix-cache-action 6 -> 7, Determ… #483

build(deps): DeterminateSystems/magic-nix-cache-action 6 -> 7, Determ…

build(deps): DeterminateSystems/magic-nix-cache-action 6 -> 7, Determ… #483

Workflow file for this run

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@v7
- 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@v7
- 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@v7
- 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 }}"