-
Notifications
You must be signed in to change notification settings - Fork 36
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
(Question) Possibility or using mutliple tags for a single build #7
Comments
Hi, V-ed, and thanks for your contribution! As far as I know - it's possible to do so. I'll add this feature in the near future. I'm sure you already know this, but until this option is available, you can run this action multiple times in the same pipeline pushing two images subsequently. |
Interesting! Thanks for the heads up :) And while I thought about running it twice indeed, I was thinking about the fact that it would essentially build twice for no reason, as it is the same image - I was already trying to optimize my pipelines haha I also though about potentially using the |
This was the first thing I looked for, I generally want to generate 3 tags based on the version. I'd like to have this: - name: Build and Publish head Docker image
uses: VaultVulp/gp-docker-action@1.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
image-name: my-cool-service
image-tags:
- latest
- "${{ steps.increment.outputs.version }}"
- "${{ steps.increment.outputs.major }}.${{ steps.increment.outputs.minor }}" |
question: did you push this modification? |
@manang Not yet, sadly. |
As far as I know, it's impossible to pass list values to the github actions. image-tags:
- latest
- "${{ steps.increment.outputs.version }}"
- "${{ steps.increment.outputs.major }}.${{ steps.increment.outputs.minor }}" but, I guess I could try to implement something similar to: additional-image-tags: "foo bar buz" |
Done! Example workflow: name: Build and publish
on: push
jobs:
build-with-multiple-tags:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.5.0 # Checking out the repo
- name: Build with multiple tags
uses: VaultVulp/gp-docker-action@1.4.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # Provide GITHUB_TOKEN to login into the GitHub Packages
image-name: my-cool-service # Provide Docker image name
image-tags: first # if ommitted will be replaced with "latest"
additional-image-tags: second third # two additional tags for an image |
Not to be too picky, but why not an array? image-tags:
- first
- second
- third It would come through as a string or array, so it should be a non-breaking change. |
@justinmchase If you can point me to the documentation or an example that shows how to pass list of values into the input - I'll try to reimplement my action. |
Ok, wow, I never noticed that before but it seems like the places where I have been configuring "arrays" have been like this: languages: javascript, typescript While I thought it was: languages: [javascript, typescript] Which is indeed, not an array, technically. So my mistake, thanks for the explanation. |
Is it possible to run a build and tag it with multiple tags?
The use case would be to use
extract-git-tag: true
while also updating alatest
tag up to date.Thanks in advance!
The text was updated successfully, but these errors were encountered: