.gitea/workflows/release.yml aktualisiert
All checks were successful
release / release (push) Successful in 1s
All checks were successful
release / release (push) Successful in 1s
This commit is contained in:
parent
16b93be0e2
commit
0c699c865b
@ -11,12 +11,16 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
runs-on: act-runner-user
|
runs-on: act-runner-user
|
||||||
steps:
|
steps:
|
||||||
- name: check and update hugo repo
|
- name: check hugo version
|
||||||
|
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')
|
||||||
if [ $NEWEST_HUGO_RELEASE != $CURRENT_HUGO_RELEASE ]
|
echo update_available=$(! [[ $NEWEST_HUGO_RELEASE != $CURRENT_HUGO_RELEASE ]]; echo $?) >> $GITHUB_OUTPUT
|
||||||
then
|
|
||||||
curl -LO https://github.com/gohugoio/hugo/releases/download/v$(echo $NEWEST_HUGO_RELEASE)/hugo_extended_$(echo $NEWEST_HUGO_RELEASE)_linux-amd64.deb
|
- name: update hugo package
|
||||||
curl --user ${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }} --upload-file hugo_extended_$(echo $NEWEST_HUGO_RELEASE)_linux-amd64.deb https://git.cantorgymnasium.de/api/packages/gcg/debian/pool/all/main/upload
|
if: steps.check.update_available == 1
|
||||||
fi
|
run: |
|
||||||
|
export NEWEST_HUGO_RELEASE=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases | jq -r '.[0].name' | sed 's/v//g')
|
||||||
|
curl -LO https://github.com/gohugoio/hugo/releases/download/v$(echo $NEWEST_HUGO_RELEASE)/hugo_extended_$(echo $NEWEST_HUGO_RELEASE)_linux-amd64.deb
|
||||||
|
curl --user ${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }} --upload-file hugo_extended_$(echo $NEWEST_HUGO_RELEASE)_linux-amd64.deb https://git.cantorgymnasium.de/api/packages/gcg/debian/pool/all/main/upload
|
Loading…
x
Reference in New Issue
Block a user