Skip to content

Commit

Permalink
APIGOV-28567 - add promotion type
Browse files Browse the repository at this point in the history
  • Loading branch information
dfeldick committed Aug 15, 2024
1 parent 5fcbbee commit e0f6982
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/create-tag-for-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Download promotion type artifact
uses: dawidd6/action-download-artifact@v6
with:
name: promotiontype
workflow: fully-automated-release.yml
github_token: ${{ secrets.ACTION_ACCESS_TOKEN }}

- name: Get promotion type from artifact
id: promotype
run: |
echo "promotype=$(cat promotiontype.txt)" >> $GITHUB_OUTPUT
- name: Bump tag version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
# by default, this action creates a tag with a 'v' prefix, and bumps the patch version.
# See https://github.com/mathieudutour/github-tag-action to customize these rules.
github_token: ${{ secrets.ACTION_ACCESS_TOKEN }}
default_bump: ${{ steps.promotype.outputs.promotype }}

- name: Show the new tag
run: |
Expand Down
26 changes: 25 additions & 1 deletion .github/workflows/fully-automated-release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
# this action is triggered by selecting the action in the github UI and then clicking "run workflow"
name: Fully automated release

on: workflow_dispatch
on:
workflow_dispatch:
inputs:
promotiontype:
description: Promotion type (major, minor, patch)
required: true
default: 'patch'
type: choice
options:
- major
- minor
- patch

jobs:
archiveInput:
runs-on: ubuntu-latest
steps:
- run: echo ${{ github.event.inputs.promotiontype }} >> promotiontype.txt

- name: Archive type
uses: actions/upload-artifact@v4
with:
name: promotiontype
retention-days: 1
path: |
./promotiontype.txt
updateAndCreatePR:
env:
GOFLAGS: "-mod=mod"
Expand Down

0 comments on commit e0f6982

Please sign in to comment.