Skip to content
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

feat: replace auto-tag action #74

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ GitHub Action for build and push docker images, Sysdig way
- `dry_run`: whether to actually create git tag and push the image (default: false)
- `external_tag`: use this tag instead of having the action calculate it
- `latest_tag`: "generate `latest` tag for the image". Default: `false`
- `file_paths`: glob pattern list. These should be the paths that trigger this specific action. Useful in a monorepo, to have action-auto-tag properly bump the version. Due to limitations with GitHub Actions inputs, this is specified as a string. Default: ''
- `push_to_artifactory`: whether push image to artifactory (default: false)
- `push_to_quay`: whether push image to quay.io (default: false)
- `push_to_gar`: whether push image to GAR (default: true)
Expand Down
11 changes: 7 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ inputs:
required: false
default: "false"

file_paths:
description: "glob pattern list. These should be the paths that trigger this specific action. Usefull in a monorepo, to have action-auto-tag properly bump the version. Due to limitations with GitHub Actions inputs, this is specified as a string."
required: false
default: ''

context_path:
description: "path to context directory (where the build starts)"
required: true
Expand Down Expand Up @@ -247,12 +252,10 @@ runs:
- name: Bump container version and create new github tag
if: ${{ ! inputs.external_tag }}
id: bump_version
uses: mathieudutour/[email protected]
uses: panepan83/action-auto-tag@v1
with:
github_token: ${{ inputs.github_token }}
tag_prefix: container/${{ inputs.image_name }}-
fetch_all_tags: true
# we must create a git tag only when pushing
file_paths: ${{ inputs.file_paths }}
dry_run: ${{ inputs.dry_run == 'true' || inputs.push == 'false' }}

- name: Build images names
Expand Down