0
0

.gitea/workflows/update-check.yml aktualisiert
All checks were successful
HUGO Update Check / update-check (push) Successful in 2s

This commit is contained in:
Denys Konovalov 2024-07-07 11:16:21 +02:00
parent 6210e515ba
commit d9461faf15

@ -10,14 +10,14 @@ jobs:
update-check: update-check:
runs-on: act-runner-user runs-on: act-runner-user
steps: steps:
- name: check available hugo version - name: Check available HUGO version
id: check id: check
run: | run: |
export NEWEST_HUGO_RELEASE=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases | jq -r '.[0].name' | sed 's/v//g') export NEWEST_HUGO_RELEASE=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases | jq -r '.[0].name' | sed 's/v//g')
export CURRENT_HUGO_RELEASE=$(curl --user ${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }} https://git.cantorgymnasium.de/api/v1/packages/gcg | jq -r 'map(select( .name | contains("hugo"))) | .[0].version') export CURRENT_HUGO_RELEASE=$(curl --user ${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }} https://git.cantorgymnasium.de/api/v1/packages/gcg | jq -r 'map(select( .name | contains("hugo"))) | .[0].version')
echo update_available=$(! [[ $NEWEST_HUGO_RELEASE != $CURRENT_HUGO_RELEASE ]]; echo $?) >> $GITHUB_OUTPUT echo update_available=$(! [[ $NEWEST_HUGO_RELEASE != $CURRENT_HUGO_RELEASE ]]; echo $?) >> $GITHUB_OUTPUT
- name: update hugo package - name: Update HUGO package
if: steps.check.outputs.update_available == 1 if: steps.check.outputs.update_available == 1
run: | run: |
export NEWEST_HUGO_RELEASE=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases | jq -r '.[0].name' | sed 's/v//g') export NEWEST_HUGO_RELEASE=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases | jq -r '.[0].name' | sed 's/v//g')