From bfdb28c37ba49c71cfccddd9c22736f759659033 Mon Sep 17 00:00:00 2001 From: "Sean P. Kelly" Date: Mon, 16 Sep 2024 19:44:52 +0000 Subject: [PATCH 1/2] ci: don't build on push, only on PR --- .github/workflows/rust.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 28cd6e062..279ab9193 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -8,13 +8,6 @@ on: - "**.md" - "**.plantuml" - "**.svg" - # triggers when a PR is merged - push: - branches: [develop] - paths-ignore: - - "**.md" - - "**.plantuml" - - "**.svg" jobs: build: runs-on: From 5fc32f35c2d852c0e4697f63981e3bda825148bd Mon Sep 17 00:00:00 2001 From: "Sean P. Kelly" Date: Mon, 16 Sep 2024 19:45:15 +0000 Subject: [PATCH 2/2] ci: only run release workflow in twoliter GH repo --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99cb57ea3..3344a8957 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,6 +47,7 @@ on: jobs: # Create the Github Releaseā„¢ so the packages have something to be uploaded to create-release: + if: github.repository == 'bottlerocket-os/twoliter' environment: release runs-on: group: bottlerocket @@ -93,6 +94,7 @@ jobs: # Build and packages all the things upload-artifacts: + if: github.repository == 'bottlerocket-os/twoliter' # Let the initial task tell us to not run (currently very blunt) needs: create-release if: ${{ needs.create-release.outputs.has-releases == 'true' }} @@ -150,6 +152,7 @@ jobs: # Mark the Github Releaseā„¢ as a non-draft now that everything has succeeded! publish-release: + if: github.repository == 'bottlerocket-os/twoliter' # Only run after all the other tasks, but it's ok if upload-artifacts was skipped needs: [create-release, upload-artifacts] if: ${{ always() && needs.create-release.result == 'success' && (needs.upload-artifacts.result == 'skipped' || needs.upload-artifacts.result == 'success') }}