Skip to content

Commit

Permalink
Merge pull request #57 from semiotic-ai/56-ci-fix-semantic-release-wo…
Browse files Browse the repository at this point in the history
…rkflow

ci(semver.yml): updated semantic-release to provide published flag and published_version
  • Loading branch information
aasseman authored Feb 9, 2023
2 parents 141cce8 + 327f496 commit a5f290e
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/semver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,46 @@ jobs:
permissions:
contents: write

outputs:
new_release_published: ${{ steps.release.outputs.new_release_published }}
new_release_major_version: ${{ steps.release.outputs.new_release_major_version }}
new_release_minor_version: ${{ steps.release.outputs.new_release_minor_version }}
new_release_patch_version: ${{ steps.release.outputs.new_release_patch_version }}
outputs:
published: ${{ steps.release.outputs.published }}
published_version: ${{ steps.release.outputs.published_version }}
published_version_major: ${{ steps.release.outputs.published_version_major }}
published_version_minor: ${{ steps.release.outputs.published_version_minor }}
published_version_patch: ${{ steps.release.outputs.published_version_patch }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Python Semantic Release
id: release
uses: aasseman/python-semantic-release@gh_outputs
uses: tumaysem/python-semantic-release@master
with:
additional_options: --github
github_token: ${{ secrets.GITHUB_TOKEN }}

container_build:
runs-on: ubuntu-latest
needs: release
if: needs.release.outputs.new_release_published == 'true'
if: needs.release.outputs.published == 'True'
permissions:
packages: write

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: autoagora
tags: latest v${{ needs.release.outputs.new_release_major_version }}.${{ needs.release.outputs.new_release_minor_version }}.${{ needs.release.outputs.new_release_patch_version }} v${{ needs.release.outputs.new_release_major_version }}.${{ needs.release.outputs.new_release_minor_version }} v${{ needs.release.outputs.new_release_major_version }}
tags: >
latest
v${{ needs.release.outputs.published_version_major }}
v${{ needs.release.outputs.published_version_major }}.${{ needs.release.outputs.published_version_minor }}
v${{ needs.release.outputs.published_version}}
containerfiles: |
./Dockerfile
- name: Push
Expand Down

0 comments on commit a5f290e

Please sign in to comment.