Skip to content

Commit

Permalink
Merge pull request #6 from AustrianDataLAB/dev
Browse files Browse the repository at this point in the history
fix: use fromTag to generate changelog
  • Loading branch information
Sokadyn authored Jun 2, 2023
2 parents b75952e + 9a74f89 commit 220397b
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# main.yml
name: Build and Release operator
run-name: Build/Release operator triggerd by ${{ github.actor }} - ${{ github.event.head_commit.message }}
run-name: Build/Release operator triggerd by ${{ github.actor }} - ${{ github.event.head_commit.message }}${{ github.event.pull_request.title }}

on:
push:
Expand Down Expand Up @@ -35,6 +35,8 @@ jobs:
IMAGE_REPO: ${{ steps.SET_IMAGE_REPO.outputs.IMAGE_REPO }}
OPERATOR_VERSION: ${{ steps.SET_OPERATOR_VERSION.outputs.OPERATOR_VERSION }}
IS_RELEASE: ${{ steps.SET_OPERATOR_VERSION.outputs.IS_RELEASE }}
current: ${{ steps.semver.outputs.current }}
next: ${{ steps.semver.outputs.next }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -58,7 +60,7 @@ jobs:
id: SET_OPERATOR_VERSION
uses: actions/github-script@v6
env:
NEXT: ${{ steps.semver.outputs.next }}
NEXT: ${{ steps.semver.outputs.next }}
with:
result-encoding: string
script: |
Expand Down Expand Up @@ -155,6 +157,8 @@ jobs:
runs-on: ubuntu-latest
env:
OPERATOR_VERSION: ${{ needs.prepare.outputs.OPERATOR_VERSION }}
current: ${{ needs.prepare.outputs.current }}
next: ${{ needs.prepare.outputs.next }}
if: github.ref_name == 'main' && needs.prepare.outputs.IS_RELEASE == 'true'
permissions:
contents: write
Expand All @@ -164,7 +168,7 @@ jobs:
uses: requarks/[email protected]
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
fromTag: ${{ env.current }}
# Create a new release on GitHub with the semantic version number
- name: Create Release
uses: ncipollo/[email protected]
Expand All @@ -174,13 +178,20 @@ jobs:
makeLatest: true
name: "Release: ${{ env.OPERATOR_VERSION }}"
body: |
# Version
${{ env.OPERATOR_VERSION }}
# Install new operator version
operator-sdk run bundle ghcr.io/austriandatalab/execdat-operator-bundle:${{ env.OPERATOR_VERSION }}
# Pull new images
docker pull ghcr.io/austriandatalab/execdat-operator-bundle:${{ env.OPERATOR_VERSION }}
docker pull ghcr.io/austriandatalab/execdat-operator-buildah:${{ env.OPERATOR_VERSION }}
docker pull ghcr.io/austriandatalab/execdat-operator:${{ env.OPERATOR_VERSION }}
# Changelog
${{ steps.changelog.outputs.changes }}
token: ${{ github.token }}
commit: main
commit: ${{ github.sha }}
tag: ${{ env.OPERATOR_VERSION }}
generateReleaseNotes: true

Expand Down

0 comments on commit 220397b

Please sign in to comment.