From 3d7a6deef17c3d9d90a8975c32b779474086ebbd Mon Sep 17 00:00:00 2001 From: shubham-stepsecurity Date: Wed, 17 Jul 2024 19:59:46 +0530 Subject: [PATCH] Update and rename release.yml to actions_release.yml --- .github/workflows/actions_release.yml | 21 +++++++++++++++ .github/workflows/release.yml | 37 --------------------------- 2 files changed, 21 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/actions_release.yml delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/actions_release.yml b/.github/workflows/actions_release.yml new file mode 100644 index 0000000..3b95889 --- /dev/null +++ b/.github/workflows/actions_release.yml @@ -0,0 +1,21 @@ +name: Release GitHub Actions + +on: + workflow_dispatch: + inputs: + tag: + description: "Tag for the release" + required: true + +permissions: + contents: read + +jobs: + release: + permissions: + actions: read + id-token: write + contents: write + uses: step-security/reusable-workflows/.github/workflows/actions_release.yaml@v1 + with: + tag: "${{ github.event.inputs.tag }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index a99bfc1..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Release new action version -on: - workflow_dispatch: - inputs: - TAG_NAME: - description: 'Tag name that the major tag will point to' - required: true - -env: - TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} -defaults: - run: - shell: pwsh - -permissions: - contents: read - -jobs: - update_tag: - name: Update the major tag to include the ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} changes - # Remember to configure the releaseNewActionVersion environment with required approvers in the repository settings - environment: - name: releaseNewActionVersion - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 - with: - egress-policy: audit - - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - - name: Update the ${{ env.TAG_NAME }} tag - uses: step-security/publish-action@00f33a2a7d8b77187d08ce666d0d5d73ad1dfb93 - with: - source-tag: ${{ env.TAG_NAME }}