Open sirajissani opened 10 months ago
@choffmeister I get the same results when updating to v0.4.0 (via Dependabot PR).
Is this unintentional, or should users of the action refrain from specifying explicit false
values for settings?
This is how I have the action configured in one of my projects for the v0.3.11 release:
uses: choffmeister/git-describe-semver@v0.3.11
with:
fallback: v0.0.0
drop-prefix: false
prerelease-prefix: dev
prerelease-suffix: ""
prerelease-timestamped: false
Updating it to this configuration breaks CI:
uses: choffmeister/git-describe-semver@v0.4.0
with:
fallback: v0.0.0
drop-prefix: false
prerelease-prefix: dev
prerelease-suffix: ""
prerelease-timestamped: false
with the same message that @sirajissani reported:
bool flag `--drop-prefix' cannot have an argument
@atc0005 does it work for you if you were to rollback to @0.3.11
? For me, it failed even without bumping the version used in the CI job. However, do note that @master
fixes the pipeline for now. You can also check the changes to action.yaml
in bc76515.
@sirajissani I have the version pinned to what I believe is v0.3.11 and it works (going from memory, responding quickly via mobile).
Dependabot offered the latest version which failed to pass CI, so I did not accept the version bump.
@atc0005 I just checked your recently run actions and they do fail exactly as mine even with v0.3.11
.
@sirajissani Thanks for checking.
I thought I remembered otherwise, but as you noted when I looked back at the earlier logs I see that you are correct.
From your updated original post:
Also, it was a surprise that a later commit broke 0.3.11. Perhaps the action always pulls the latest docker image.
This appears to be the case.
This is recorded in the logs for a recent CI job (https://github.com/atc0005/go-ci/actions/runs/7472502581/job/20334831671#step:7:8):
Run choffmeister/git-describe-semver@v0.3.11
Run docker://ghcr.io/choffmeister/git-describe-semver:latest
with the same result:
bool flag `--drop-prefix' cannot have an argument
The ghcr.io/choffmeister/git-describe-semver:latest
image (https://github.com/choffmeister/git-describe-semver/pkgs/container/git-describe-semver/156253338?tag=0.4.0) appears to be used instead of the expected v0.3.11 (https://github.com/choffmeister/git-describe-semver/pkgs/container/git-describe-semver/93675714?tag=0.3.11) image.
@choffmeister would it be useful if we filed a separate GH issue for the Docker tags issue noted above?
@sirajissani Potentially related:
If understand the changes between v0.3.11 and v0.4.0 correctly, then the flag package was swapped out and the new one does not support explicitly setting a boolean flag as false.
@sirajissani
If you want to stick with v0.3.11, try this:
- id: git_describe_semver
uses: choffmeister/git-describe-semver@v0.4.0 # version of the action
with:
fallback: 0.0.0
prerelease-prefix: pre
prerelease-suffix: ''
prerelease-timestamped: false
version: v0.3.11 # version of the tool
The action fails with the following top level message on GitHub CI. The issue is observed
0.3.11
as well as0.4.0
. However the issue is fixed on the main branch - that is@main
worksGithub Action Logs
``` Run choffmeister/git-describe-semver@v0.4.0 with: fallback: 0.0.0 prerelease-prefix: pre prerelease-timestamped: false version: latest dir: . drop-prefix: false Run cd /tmp cd /tmp URL=$(curl -fsSL https://api.github.com/repos/choffmeister/git-describe-semver/releases/latest | jq -r '.assets[] | select(.name|test("linux_amd64\\.tar\\.gz$")) | .browser_download_url') curl -fsSL "$URL" | tar xz mv git-describe-semver /usr/local/bin shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} Run git-describe-semver \ git-describe-semver \ --dir="." \ --fallback="0.0.0" \ --drop-prefix="false" \ --prerelease-prefix="pre" \ --prerelease-suffix="" \ --prerelease-timestamped="false" \ \ --format="version=" \
$GITHUB_OUTPUT
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
bool flag `--drop-prefix' cannot have an argument
Error: Process completed with exit code 1.
```
The workflow job is as follows
```yml jobs: get_version: name: Get Build Version runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.5.3 with: submodules: 'true' fetch-depth: 0 set-safe-directory: 'true' - id: git_describe_semver uses: choffmeister/git-describe-semver@v0.4.0 with: fallback: 0.0.0 prerelease-prefix: pre prerelease-suffix: '' prerelease-timestamped: false ```
Could you please tag this release so that I could refer to it specifically. Also, it was a surprise that a later commit broke
0.3.11
. Perhaps the action always pulls thelatest
docker image. Any help for this would be greatly appreciated.