Skip to content

Commit

Permalink
Use GH Action to extract the tag (#2349)
Browse files Browse the repository at this point in the history
* Use action to extract the tag

Signed-off-by: Jorge Turrado <[email protected]>
  • Loading branch information
Jorge Turrado Ferrero authored Nov 25, 2021
1 parent 0de863c commit cff3a44
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,26 @@ jobs:
run: echo $DOCKER_HUB_ACCESS_TOKEN | docker login -u $DOCKER_HUB_USERNAME --password-stdin

- name: Get the version
uses: little-core-labs/[email protected]
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
with:
tagRegex: "v(.*)"
tagRegexGroup: 1

- name: Release Deployment YAML file
run: make release
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
VERSION: ${{ steps.get_version.outputs.tag }}

- name: Publish KEDA images on GitHub Container Registry
run: make publish
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
VERSION: ${{ steps.get_version.outputs.tag }}

- name: Publish KEDA images on Docker Hub
run: make publish-dockerhub
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
VERSION: ${{ steps.get_version.outputs.tag }}

# Get release information to determine id of the current release
- name: Get Release
Expand All @@ -84,7 +87,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: https://uploads.github.com/repos/kedacore/keda/releases/${{ steps.get-release-info.outputs.id }}/assets?name=keda-${{ steps.get_version.outputs.VERSION }}.yaml
asset_path: keda-${{ steps.get_version.outputs.VERSION }}.yaml
asset_name: keda-${{ steps.get_version.outputs.VERSION }}.yaml
upload_url: https://uploads.github.com/repos/kedacore/keda/releases/${{ steps.get-release-info.outputs.id }}/assets?name=keda-${{ steps.get_version.outputs.tag }}.yaml
asset_path: keda-${{ steps.get_version.outputs.tag }}.yaml
asset_name: keda-${{ steps.get_version.outputs.tag }}.yaml
asset_content_type: application/x-yaml

0 comments on commit cff3a44

Please sign in to comment.