Files
trevstack/.github/workflows/check.yaml
trev c01fc59271
All checks were successful
Check / check (push) Successful in 1m7s
Check / update (push) Has been skipped
Check / push (push) Successful in 13s
ci: push to prod
2025-06-16 12:12:15 -04:00

67 lines
1.7 KiB
YAML

name: Check
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, edited, auto_merge_enabled]
jobs:
check:
name: check
runs-on: ubuntu-latest
if: |
contains(github.event.head_commit.message, 'bump:') == false &&
contains(github.event.head_commit.message, 'Merge pull request') == false
steps:
- uses: actions/checkout@v4
- name: Install nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Use cachix
uses: cachix/cachix-action@v16
with:
name: trevstack
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- run: nix flake check --accept-flake-config
push:
name: push
runs-on: ubuntu-latest
needs: check
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: "0"
# https://github.com/actions/checkout/issues/13
- name: Push to Production
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git push origin main:production
update:
name: update
runs-on: ubuntu-latest
if: ${{ contains(github.event.head_commit.message, 'Merge pull request') }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: "0"
# https://github.com/actions/checkout/issues/13
- name: Push to Production
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git push origin main:production