From 71330cdb8169d43496e1b1f92eeec4fbb2703193 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Thu, 22 Apr 2021 09:58:56 +0100 Subject: [PATCH] Do base update releases --- .github/workflows/auto-release-base.yml | 25 ++++++++++++++++++++ .github/workflows/check-baseimage-update.yml | 25 ++++++++++++++++++++ release-versions/lsiobase-alpine-latest.txt | 0 3 files changed, 50 insertions(+) create mode 100644 .github/workflows/auto-release-base.yml create mode 100644 .github/workflows/check-baseimage-update.yml create mode 100644 release-versions/lsiobase-alpine-latest.txt diff --git a/.github/workflows/auto-release-base.yml b/.github/workflows/auto-release-base.yml new file mode 100644 index 0000000..aa63c50 --- /dev/null +++ b/.github/workflows/auto-release-base.yml @@ -0,0 +1,25 @@ +name: "Release on base update" + +on: + push: + paths: + - 'release-versions/*' + branches: + - 'main' + +jobs: + pre-release: + name: "Pre Release" + runs-on: "ubuntu-latest" + + steps: + - name: "Build & test" + run: | + echo "done!" + + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.REPO_SCOPED_TOKEN }}" + automatic_release_tag: "update-base" + prerelease: true + title: "Base Image Update" diff --git a/.github/workflows/check-baseimage-update.yml b/.github/workflows/check-baseimage-update.yml new file mode 100644 index 0000000..80e077d --- /dev/null +++ b/.github/workflows/check-baseimage-update.yml @@ -0,0 +1,25 @@ +name: Get latest release version +on: + schedule: + - cron: '0 0 * * 0' +jobs: + get-version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + token: ${{ secrets.REPO_SCOPED_TOKEN }} + - name: Fetch release version + run: | + curl -sL https://api.github.com/repos/linuxserver/docker-baseimage-alpine/releases/latest | \ + jq -r ".tag_name" > release-versions/lsiobase-alpine-latest.txt + - name: Check for modified files + id: git-check + run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") + - name: Commit latest release version + if: steps.git-check.outputs.modified == 'true' + run: | + git config --global user.name 'TheSpad' + git config --global user.email 'git@spad.co.uk' + git commit -am "New lsiobase-alpine release version" + git push diff --git a/release-versions/lsiobase-alpine-latest.txt b/release-versions/lsiobase-alpine-latest.txt new file mode 100644 index 0000000..e69de29