From 23b671d34237ba5f5c0b0424a150a71e54ae44b0 Mon Sep 17 00:00:00 2001 From: Jeffrey Clark Date: Sun, 5 May 2024 17:43:44 -0500 Subject: [PATCH 1/3] (maint) target release-any-tag cat workflows --- .github/workflows/ci.yml | 8 ++++++-- .github/workflows/labeller.yml | 25 +++++------------------- .github/workflows/mend.yml | 4 ++-- .github/workflows/nightly.yml | 4 ++-- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++- .github/workflows/release_prep.yml | 2 +- .github/workflows/release_without.yml | 9 +++++++++ 7 files changed, 52 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/release_without.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65c1a9fc..61141e71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,14 +7,18 @@ on: - "main" workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: Spec: - uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main" + uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@release-any-tag" secrets: "inherit" Acceptance: needs: Spec - uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" + uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@release-any-tag" secrets: "inherit" with: runs_on: "ubuntu-20.04" diff --git a/.github/workflows/labeller.yml b/.github/workflows/labeller.yml index 84b1d881..5dcbfa3e 100644 --- a/.github/workflows/labeller.yml +++ b/.github/workflows/labeller.yml @@ -1,28 +1,13 @@ ---- name: Labeller on: issues: - types: - - opened - - labeled - - unlabeled + types: [ opened, reopened, labeled, unlabeled ] pull_request_target: - types: - - opened - - labeled - - unlabeled + types: [ opened, reopened, labeled, unlabeled ] jobs: label: - runs-on: ubuntu-latest - steps: - - - uses: puppetlabs/community-labeller@v1.0.1 - name: Label issues or pull requests - with: - label_name: community - label_color: '5319e7' - org_membership: puppetlabs - fail_if_member: 'true' - token: ${{ secrets.IAC_COMMUNITY_LABELER }} + if: contains(fromJson('["puppetlabs","puppet-toy-chest"]'), github.repository_owner) + uses: "puppetlabs/cat-github-actions/.github/workflows/labeller.yml@release-any-tag" + secrets: inherit diff --git a/.github/workflows/mend.yml b/.github/workflows/mend.yml index 08ade269..22a1fde4 100644 --- a/.github/workflows/mend.yml +++ b/.github/workflows/mend.yml @@ -1,4 +1,3 @@ ---- name: "mend" on: @@ -11,6 +10,7 @@ on: workflow_dispatch: jobs: + mend: - uses: "puppetlabs/cat-github-actions/.github/workflows/mend_ruby.yml@main" + uses: "puppetlabs/cat-github-actions/.github/workflows/mend_ruby.yml@release-any-tag" secrets: "inherit" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 163ce92f..f1a5d77c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -8,12 +8,12 @@ on: jobs: Spec: - uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main" + uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@release-any-tag" secrets: "inherit" Acceptance: needs: Spec - uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" + uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@release-any-tag" secrets: "inherit" with: runs_on: "ubuntu-20.04" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5a45aa01..27c86602 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,35 @@ name: "Publish module" +run-name: > + ${{ format('tag={0}', inputs.tag) }} + ${{ format('release={0}', inputs.release) }} + ${{ format('publish={0}', inputs.publish) }} + ${{ format('edit={0}', inputs.edit) }} on: workflow_dispatch: + inputs: + tag: + description: "Enter an old tag, or blank to tag HEAD of branch" + type: string + release: + description: "Create a Github release" + type: boolean + default: true + publish: + description: "Publish to the Forge" + type: boolean + default: true + edit: + description: "Re-tag and regenerate release notes" + type: boolean + default: false jobs: release: - uses: "puppetlabs/cat-github-actions/.github/workflows/module_release.yml@main" + uses: "puppetlabs/cat-github-actions/.github/workflows/module_release.yml@release-any-tag" secrets: "inherit" + with: + tag: ${{ inputs.tag }} + release: ${{ inputs.release }} + publish: ${{ inputs.publish }} + edit: ${{ inputs.edit }} diff --git a/.github/workflows/release_prep.yml b/.github/workflows/release_prep.yml index bb0b7acc..5a049914 100644 --- a/.github/workflows/release_prep.yml +++ b/.github/workflows/release_prep.yml @@ -9,7 +9,7 @@ on: jobs: release_prep: - uses: "puppetlabs/cat-github-actions/.github/workflows/module_release_prep.yml@main" + uses: "puppetlabs/cat-github-actions/.github/workflows/module_release_prep.yml@release-any-tag" with: version: "${{ github.event.inputs.version }}" secrets: "inherit" diff --git a/.github/workflows/release_without.yml b/.github/workflows/release_without.yml new file mode 100644 index 00000000..7d6f1f74 --- /dev/null +++ b/.github/workflows/release_without.yml @@ -0,0 +1,9 @@ +name: "Publish module without" + +on: + workflow_dispatch: + +jobs: + release: + uses: "puppetlabs/cat-github-actions/.github/workflows/module_release.yml@release-any-tag" + secrets: "inherit" From 15314e0f256a21c4843040a2b4be0f207ef411a9 Mon Sep 17 00:00:00 2001 From: Jeffrey Clark Date: Mon, 6 May 2024 21:30:13 -0500 Subject: [PATCH 2/3] (maint) remove labeller workflow not used or working right now --- .github/workflows/labeller.yml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .github/workflows/labeller.yml diff --git a/.github/workflows/labeller.yml b/.github/workflows/labeller.yml deleted file mode 100644 index 5dcbfa3e..00000000 --- a/.github/workflows/labeller.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Labeller - -on: - issues: - types: [ opened, reopened, labeled, unlabeled ] - pull_request_target: - types: [ opened, reopened, labeled, unlabeled ] - -jobs: - label: - if: contains(fromJson('["puppetlabs","puppet-toy-chest"]'), github.repository_owner) - uses: "puppetlabs/cat-github-actions/.github/workflows/labeller.yml@release-any-tag" - secrets: inherit From c24e65c324ffafe01d2c5f4cc54e6c9012901217 Mon Sep 17 00:00:00 2001 From: Jeffrey Clark Date: Tue, 7 May 2024 09:03:53 -0500 Subject: [PATCH 3/3] (maint) add h0tw1r3 to codeowners --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 93cbbac6..9988e2b3 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @puppetlabs/puppetdb @bastelfreak @smortex +* @puppetlabs/puppetdb @bastelfreak @smortex @h0tw1r3