diff --git a/.github/workflows/release-new-action-version.yml b/.github/workflows/release.yml similarity index 89% rename from .github/workflows/release-new-action-version.yml rename to .github/workflows/release.yml index 373c1a6..6b270f0 100644 --- a/.github/workflows/release-new-action-version.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,11 @@ -name: Release new action version +name: Release on: release: - types: [edited] + types: [released] workflow_dispatch: inputs: TAG_NAME: - description: 'Tag name that the major tag will point to' + description: "Tag name that the major tag will point to" required: true env: @@ -13,6 +13,9 @@ env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} +permissions: + contents: write + jobs: verify_release: runs-on: ubuntu-latest @@ -37,11 +40,13 @@ jobs: fi - name: Verify image published run: docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_NAME }} + update_tag: needs: verify_release name: Update the major tag to include the ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} changes environment: - name: releaseNewActionVersion + # Note: this environment is protected + name: Release runs-on: ubuntu-latest outputs: major_tag: ${{ steps.update-major-tag.outputs.major-tag }}