Skip to content

generate-docker-image-tags supports release triggers #18

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

Merged
merged 11 commits into from
Nov 14, 2022

Conversation

michaelvu97
Copy link
Contributor

@michaelvu97 michaelvu97 commented Nov 4, 2022

Background

GitHub Actions may trigger workflows when a release is created.

Changes

  • generate-docker-image-tags supports being triggered from a release workflow context.
    • Will assign the git tag to the docker image tag

Sample Usage in Workflow

on:
  release:

jobs:
  foo:
    steps:
      - name: Get tags
        id: tags
        uses: XanaduAI/cloud-actions/generate-docker-image-tags@latest
        with:
          prefix: "release"

E.g. if a release is created from the tag v1.5.1, this workflow will output a docker image tag: release.v1.5.1

@michaelvu97 michaelvu97 marked this pull request as ready for review November 7, 2022 15:26
Copy link
Contributor

@Mandrenkov Mandrenkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me! 🧙

Do you have a link to a GitHub Actions run which uses this version of the GDIT action? We may need to update the get-tags step to set PR_NUMBER to the empty string when the GitHub event trigger is a release.

@michaelvu97
Copy link
Contributor Author

Copy link
Contributor

@Mandrenkov Mandrenkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @michaelvu97! Where in those runs do you see the generated tags though?

Screen Shot 2022-11-07 at 4 27 45 PM

@michaelvu97
Copy link
Contributor Author

Copy link
Contributor

@Mandrenkov Mandrenkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks @michaelvu97! 👍 Just one query before I can Approve in good conscience!

Copy link
Contributor

@Mandrenkov Mandrenkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Way to get to the ❤️ of the problem, @michaelvu97!

@michaelvu97 michaelvu97 merged commit cf96005 into main Nov 14, 2022
@michaelvu97 michaelvu97 deleted the sc-29015-generate-docker-image-tags-supports-release branch November 14, 2022 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants