From c0aaea54ec5181dfbcac6fd1e075b1c20d119f6d Mon Sep 17 00:00:00 2001 From: Lorenzo Panichi Date: Wed, 29 May 2024 23:39:53 +0200 Subject: [PATCH] feat: replace auto-tag action --- README.md | 1 + action.yml | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3ab90ea..8138f70 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/action.yml b/action.yml index 78ae6af..a8eea9b 100644 --- a/action.yml +++ b/action.yml @@ -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 @@ -247,12 +252,10 @@ runs: - name: Bump container version and create new github tag if: ${{ ! inputs.external_tag }} id: bump_version - uses: mathieudutour/github-tag-action@v6.2 + 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