From 7d90ccd7de1fe47e4956d419d04cc8b1effd62d6 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Date: Tue, 21 Nov 2023 07:46:27 +0200 Subject: [PATCH 1/5] Use boomerang to gate boomerang --- .github/workflows/test.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df75328..61db778 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,10 +21,17 @@ jobs: - name: setup task uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1 + # Builds the bin/boomerang binary - name: build run: |- task build + - name: upload artifact + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3 + with: + name: boomerang + path: bin/boomerang + lint: runs-on: ubuntu-latest steps: @@ -58,3 +65,21 @@ jobs: task test env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # Checks that the github workflows are valid using this same tool + boomerang: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + + # Fetch boomerang artifact + - name: download artifact + uses: actions/download-artifact@v3 + with: + name: boomerang + path: bin/boomerang + + - name: Bommerang + run: |- + bin/boomerang ghactions --dry-run --error From 8a8987f62cc4b8596f879899fc570a3489dc5df2 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Date: Tue, 21 Nov 2023 07:47:45 +0200 Subject: [PATCH 2/5] Add dependency for boomerang job on build --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 61db778..6c22231 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -69,6 +69,8 @@ jobs: # Checks that the github workflows are valid using this same tool boomerang: runs-on: ubuntu-latest + needs: + - build steps: - name: checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 From 96f2266a891a5f70d34d3bc5e886da5b829ae9d9 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Date: Tue, 21 Nov 2023 07:50:40 +0200 Subject: [PATCH 3/5] change path for download artifact --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c22231..39f9d34 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,7 +80,7 @@ jobs: uses: actions/download-artifact@v3 with: name: boomerang - path: bin/boomerang + path: bin/ - name: Bommerang run: |- From fb89543d01957196bd85ab0d7480bffca0d6a428 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Date: Tue, 21 Nov 2023 07:52:05 +0200 Subject: [PATCH 4/5] Make boomerang executable for boomerang run --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 39f9d34..5c755ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,6 +82,10 @@ jobs: name: boomerang path: bin/ + - name: Make boomerang executable + run: |- + chmod +x bin/boomerang + - name: Bommerang run: |- bin/boomerang ghactions --dry-run --error From 0f94d3374a3857a8de8198d069a21b3d0717eb57 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Date: Tue, 21 Nov 2023 07:53:56 +0200 Subject: [PATCH 5/5] Used boomerang to fix .githwork/workflows/test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c755ec..af2bae3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,7 +77,7 @@ jobs: # Fetch boomerang artifact - name: download artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3 with: name: boomerang path: bin/