Repository navigation
Conversation
| steps: | ||
| - | ||
| id: get_release_img | ||
| uses: pozetronic/github-action-get-latest-release@master |
There was a problem hiding this comment.
How trustworthy is this repo/project?
There was a problem hiding this comment.
This might work instead:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get latest release
id: get_release
env:
GH_TOKEN: ${{ github.token }}
run: |
# Fetch the latest release tag name using the GitHub CLI
LATEST_TAG=$(gh release view --json tagName -q ".tagName")
echo "The latest release is $LATEST_TAG"
# Output it for use in subsequent steps
echo "latest_tag=$LATEST_TAG" >> "$GITHUB_OUTPUT"
- name: Use the latest release tag
run: |
echo "The tag from the previous step was: ${{ steps.get_release.outputs.latest_tag }}"
There was a problem hiding this comment.
No, this would not work, for I need to retrieve the latest release from 2 different repos (have a look at build_image_release.yml).
If we want a generic solution, then we would need to curl the github API that returns the latest release https://api.github.com/repos/OWNER/REPO/releases and extract the output data
There was a problem hiding this comment.
We could also select other more recently updated actions, such as ophiosdev/github-action-latest-release
There was a problem hiding this comment.
A comment from Claude:
2. Use gh instead of the third-party action. Two run: steps would do the same job with no outside dependency:
- id: get_release_img
env: { GH_TOKEN: "${{ github.token }}" }
run: echo "release=$(gh release view -R ${{ github.repository }} --json tagName -q .tagName)" >> "$GITHUB_OUTPUT"
- id: get_release_app
env: { GH_TOKEN: "${{ github.token }}" }
run: echo "release=$(gh release view -R librebooking/librebooking --json tagName -q .tagName)" >> "$GITHUB_OUTPUT"
There was a problem hiding this comment.
As a final alternative, we could git clone and git tag to retrieve the info...
But at this stage, I believe that using one of the 2 github actions is the most effective solution for such a simple need
| build-develop: | ||
| uses: ./.github/workflows/build_and_publish.yml | ||
| needs: get-data | ||
| uses: $/.github/workflows/build_and_publish.yml |
There was a problem hiding this comment.
Are you sure that this $ syntax is valid?
There was a problem hiding this comment.
Yes, the $/ syntax is valid, as indicated here
| steps: | ||
| - | ||
| id: get_release_img | ||
| uses: pozetronic/github-action-get-latest-release@master |
There was a problem hiding this comment.
A comment from Claude:
2. Use gh instead of the third-party action. Two run: steps would do the same job with no outside dependency:
- id: get_release_img
env: { GH_TOKEN: "${{ github.token }}" }
run: echo "release=$(gh release view -R ${{ github.repository }} --json tagName -q .tagName)" >> "$GITHUB_OUTPUT"
- id: get_release_app
env: { GH_TOKEN: "${{ github.token }}" }
run: echo "release=$(gh release view -R librebooking/librebooking --json tagName -q .tagName)" >> "$GITHUB_OUTPUT"
|
This PR is replaced by PR #224 |
Let github actions
build_image-develop.ymlandbuild_image_release.ymlretrieve the latest release of the librebooking:Variables to be removed:
VERSION_LB_APPVERSION_LB_IMGDOCKER_REPOSITORY