Skip to content

Commit

Permalink
Update release process to be more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
James M. Greene authored and GitHub committed Aug 19, 2022
1 parent 3887256 commit 85b8999
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
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:
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

permissions:
contents: write

jobs:
verify_release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Grep action.yaml content
id: grep-image-content
run: |
Expand All @@ -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 }}
Expand Down

0 comments on commit 85b8999

Please sign in to comment.