From 958b80e1b076d814bcd9d98d7ca1bda0755a23ce Mon Sep 17 00:00:00 2001 From: rusefillc Date: Wed, 12 Jul 2023 18:58:50 -0400 Subject: [PATCH 1/2] this (public) repo does not need MY_REPO_PAT magic --- .github/workflows/create-board.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-board.yaml b/.github/workflows/create-board.yaml index 58fc800..51c8cb5 100644 --- a/.github/workflows/create-board.yaml +++ b/.github/workflows/create-board.yaml @@ -9,7 +9,10 @@ jobs: steps: - uses: actions/checkout@v2 with: - token: ${{ secrets.MY_REPO_PAT }} +# MY_REPO_PAT is about accessing private submodules +# todo: how do we use same script both with and without MY_REPO_PAT? would two conditional versions of 'uses: actions/checkout@v2' be needed? +# https://stackoverflow.com/questions/72781712/how-to-add-private-git-repo-as-a-submodule-in-another-git-repo: +# token: ${{ secrets.MY_REPO_PAT }} submodules: recursive - name: 1. Build Docker @@ -36,4 +39,3 @@ jobs: with: github_token: ${{ github.token }} branch: ${{ steps.extract_branch.outputs.branch }} - From fbb7d0da107b401ced88ee1f2b98538db20f2a81 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Wed, 12 Jul 2023 19:01:42 -0400 Subject: [PATCH 2/2] we do not want PRs to be pushing generated stuff do we? --- .github/workflows/create-board.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-board.yaml b/.github/workflows/create-board.yaml index 51c8cb5..741b180 100644 --- a/.github/workflows/create-board.yaml +++ b/.github/workflows/create-board.yaml @@ -34,7 +34,7 @@ jobs: bash hellen-one/bin/gha-commit.sh - name: Push board files - if: ${{env.NOCOMMIT != 'true'}} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && env.NOCOMMIT != 'true'}} uses: ad-m/github-push-action@master with: github_token: ${{ github.token }}