From fb764d8bf6c5fc99ad0d79e6eb90f663b8600feb Mon Sep 17 00:00:00 2001 From: Justin Laughlin Date: Tue, 27 Aug 2024 12:53:59 -0700 Subject: [PATCH 1/2] github action checkout uses shallow clone by default; change to fetch all commits/tags --- .github/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d5c448a..f49de05 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,6 +63,8 @@ jobs: - name: Checkout glvis-js uses: actions/checkout@v4 with: + fetch-depth: 0 + fetch-tags: true submodules: recursive path: glvis-js lfs: true @@ -84,6 +86,8 @@ jobs: - name: Checkout mfem uses: actions/checkout@v4 with: + fetch-depth: 0 + fetch-tags: true repository: mfem/mfem ref: ${{ env.mfem-ref }} path: mfem @@ -91,6 +95,8 @@ jobs: - name: Checkout glvis uses: actions/checkout@v4 with: + fetch-depth: 0 + fetch-tags: true repository: glvis/glvis ref: ${{ env.glvis-ref }} path: glvis @@ -99,7 +105,6 @@ jobs: run: | cd glvis-js make install -j 4 - make versions # --------------------------------------------------------------------------------- # Generate an artifact From 55fe85e82b327a9a54c79508e64450bbda7b859f Mon Sep 17 00:00:00 2001 From: Justin Laughlin Date: Tue, 27 Aug 2024 13:02:33 -0700 Subject: [PATCH 2/2] stop pushing to new branch on pull requests --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f49de05..561c464 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,7 +43,6 @@ jobs: mfem-ref: ${{ github.event_name == 'pull_request' && 'master' || inputs.mfem-ref }} glvis-ref: ${{ github.event_name == 'pull_request' && 'master' || inputs.glvis-ref }} emscripten-version: ${{ github.event_name == 'pull_request' && '3.1.51' || inputs.emscripten-version }} - make-branch: ${{ github.event_name == 'workflow_dispatch' && inputs.make-branch }} name: >- build glvis-js | @@ -122,7 +121,7 @@ jobs: retention-days: 1 - name: Push changes to a new branch - if: env.make-branch + if: ${{ github.event_name == 'workflow_dispatch' && inputs.make-branch }} run: | cd glvis-js git config user.name "github-actions[bot]"