2023-12-19 11:00:27 +01:00
|
|
|
name: release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-12-19 11:05:23 +01:00
|
|
|
branches:
|
|
|
|
- main
|
2023-12-19 11:00:27 +01:00
|
|
|
schedule:
|
2023-12-19 11:05:23 +01:00
|
|
|
- cron: '0 0/1 * * *'
|
2023-12-19 11:00:27 +01:00
|
|
|
|
|
|
|
jobs:
|
2023-12-19 11:01:54 +01:00
|
|
|
release:
|
2023-12-19 11:00:27 +01:00
|
|
|
runs-on: act-runner-user
|
|
|
|
steps:
|
|
|
|
- name: check and update hugo repo
|
|
|
|
run: |
|
|
|
|
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')
|
2023-12-19 11:08:46 +01:00
|
|
|
if [ $NEWEST_HUGO_RELEASE != $CURRENT_HUGO_RELEASE ]; then curl -O https://github.com/gohugoio/hugo/releases/download/v0.121.1/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; fi
|