-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CY-6250] Version not updating #58
Labels
jira-issue
Issue tracked on JIRA
Comments
github-actions
bot
changed the title
Version not updating
[CY-6250] Version not updating
Jun 20, 2022
Internal ticket created : CY-6250 |
I believe the docs need to emphasize adding the tag back on the commit during the same workflow that the version is bumped. Hopefully this helps, here are the relevant sections I found myself stuck on for a few hours today: on:
push:
branches: ["main"]
paths:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#patterns-to-match-file-paths
#
# anything within the solution directory (recursive)
- repo-root/path/to/module/**
#
# trigger when this workflow gets updated also.
- .github/workflows/module.yml
# ...
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
contents: write
packages: write
# ...
- name: Git Version
id: gitversion
uses: codacy/[email protected]
with:
log-paths: repo-root/path/to/module
release-branch: main
# ...
- name: Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
id: meta
uses: docker/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
#
# https://stackoverflow.com/questions/59191913/how-do-i-get-the-output-of-a-specific-step-in-github-actions
tags: |
type=semver,pattern={{version}},value=${{steps.gitversion.outputs.version}}
- name: Build and push Docker image
# https://github.com/docker/build-push-action
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ./repo-root/path/to/module
file: ./repo-root/path/to/module/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Tag Release
# https://github.com/marketplace/actions/create-update-tag
uses: rickstaa/action-create-tag@v1
with:
tag: ${{ steps.gitversion.outputs.version }}
message: "Releasing version ${{ steps.gitversion.outputs.version }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version stays on 0.0.1. What am I missing?
The text was updated successfully, but these errors were encountered: