From 9ba4a989d6d5e224de9c89290d0edc3ccc8bee8a Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Thu, 25 Jan 2024 12:05:28 -0800 Subject: [PATCH] Replaces `pull_master` with `propose_release` action Updates deployment automation to address #77 --- .github/workflows/deploy_containers.yml | 8 +++++--- .github/workflows/propose_release.yml | 27 +++++++++++++++++++++++++ .github/workflows/pull_master.yml | 21 ------------------- 3 files changed, 32 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/propose_release.yml delete mode 100644 .github/workflows/pull_master.yml diff --git a/.github/workflows/deploy_containers.yml b/.github/workflows/deploy_containers.yml index 4ebbd1fd..fa7b59cd 100644 --- a/.github/workflows/deploy_containers.yml +++ b/.github/workflows/deploy_containers.yml @@ -6,12 +6,14 @@ on: - dev - main pull_request: + branches: + - dev workflow_dispatch: inputs: version: description: 'Images tag' required: true - default: 'dev' + default: 'alpha' # images: # description: 'Include Images (klatchat_observer|chat_client|chat_server) space-separated' # required: false @@ -61,12 +63,12 @@ jobs: - name: Apply Pull Request Environments if: github.event_name == 'pull_request' run: | - echo "VERSION=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV + echo "VERSION=alpha" >> $GITHUB_ENV # echo klatchat_observer chat_client chat_server >> $IMAGES - name: Apply Push Environments if: github.event_name == 'push' run: | - echo "VERSION=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV + echo "VERSION=$(echo ${{ github.ref_name }} | tr / -)" >> $GITHUB_ENV # echo klatchat_observer chat_client chat_server >> $IMAGES - name: Clean Up Version run: | diff --git a/.github/workflows/propose_release.yml b/.github/workflows/propose_release.yml new file mode 100644 index 00000000..81dfe43b --- /dev/null +++ b/.github/workflows/propose_release.yml @@ -0,0 +1,27 @@ +name: Propose Stable Release +on: + workflow_dispatch: + inputs: + release_type: + type: choice + description: Release Type + options: + - patch + - minor + - major +jobs: + update_version: + uses: neongeckocom/.github/.github/workflows/propose_semver_release.yml@master + with: + branch: dev + release_type: ${{ inputs.release_type }} + update_changelog: True + pull_changes: + uses: neongeckocom/.github/.github/workflows/pull_master.yml@master + needs: update_version + with: + pr_reviewer: neonreviewers + pr_assignee: ${{ github.actor }} + pr_draft: false + pr_title: ${{ needs.update_version.outputs.version }} + pr_body: ${{ needs.update_version.outputs.changelog }} \ No newline at end of file diff --git a/.github/workflows/pull_master.yml b/.github/workflows/pull_master.yml deleted file mode 100644 index 8e9c5a87..00000000 --- a/.github/workflows/pull_master.yml +++ /dev/null @@ -1,21 +0,0 @@ -# This workflow will generate a PR for changes in cert into master - -name: Pull to Master -on: - push: - branches: - - dev - workflow_dispatch: - -jobs: - pull_changes: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: pull-request-action - uses: repo-sync/pull-request@v2 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - pr_reviewer: 'neonreviewers' - pr_assignee: 'neondaniel' - pr_draft: true \ No newline at end of file