From c01fc5927101ae4cd57d3da209c9f6cb77e4d255 Mon Sep 17 00:00:00 2001 From: trev Date: Mon, 16 Jun 2025 12:12:15 -0400 Subject: [PATCH] ci: push to prod --- .gitea/workflows/check.yaml | 37 +++++++++++++++++++++++++++++++++++- .github/workflows/check.yaml | 37 +++++++++++++++++++++++++++++++++++- 2 files changed, 72 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/check.yaml b/.gitea/workflows/check.yaml index cbf6e89..369a775 100644 --- a/.gitea/workflows/check.yaml +++ b/.gitea/workflows/check.yaml @@ -28,4 +28,39 @@ jobs: name: trevstack authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - - run: nix flake check + - 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 diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index cbf6e89..369a775 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -28,4 +28,39 @@ jobs: name: trevstack authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - - run: nix flake check + - 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