From d9f947aa5d8474bc8a5a74c9d5c892011badd4e1 Mon Sep 17 00:00:00 2001 From: Crypta Eve Date: Wed, 20 Mar 2024 21:23:17 +1030 Subject: [PATCH] feat: add docker repo automation --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..379202e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +name: Tag a new seat-docker release +on: + release: + types: [released] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + name: Checkout and tag + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + repository: eveseat/seat-docker + ssh-key: '${{ secrets.SEAT_DOCKER_REPO }}' + - run: | + git config user.name github-actions + git config user.email github-actions@github.com + currver=`cat version` + a=(${currver//./ }) + newrelease=${a[2]} + newrelease=$((newrelease+1)) + newver="${a[0]}.${a[1]}.${newrelease}" + echo $newver > version + git add version + git commit -m "bump to version $newver" + git push + git tag -a "$newver" -m "src: $GITHUB_REPOSITORY commit: ${GITHUB_SHA: -8}" + git push origin --tags +