From ddf0ba0a88b8eb648ed935110c1456121e57c2a1 Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 25 Nov 2024 15:34:00 +0100 Subject: [PATCH 1/2] ci: remove setup-go from pepare.yml --- .gitea/workflows/prepare.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitea/workflows/prepare.yml b/.gitea/workflows/prepare.yml index 636eec0..544fd4d 100644 --- a/.gitea/workflows/prepare.yml +++ b/.gitea/workflows/prepare.yml @@ -15,10 +15,6 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v3 - - name: Setup go - uses: actions/setup-go@v4 - with: - go-version: '>=1.20.1' - name: Tag Release Commit env: COMMIT_MESSAGE: ${{github.event.head_commit.message}} -- 2.40.1 From c968d8c58ba8cb7a35ba51ad63367b3ebaa4da9c Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 25 Nov 2024 15:48:20 +0100 Subject: [PATCH 2/2] ci: set token via environment variable --- .gitea/workflows/prepare.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/prepare.yml b/.gitea/workflows/prepare.yml index 544fd4d..4e645f0 100644 --- a/.gitea/workflows/prepare.yml +++ b/.gitea/workflows/prepare.yml @@ -15,22 +15,17 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v3 + with: + ref: 'main' + token: ${{ secrets.RELEASE_TOKEN }} - name: Tag Release Commit env: - COMMIT_MESSAGE: ${{github.event.head_commit.message}} + COMMIT_MESSAGE: ${{ github.event.head_commit.message }} + GIT_AUTH_TOKEN: ${{ secrets.RELEASE_TOKEN }} run: | export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+') - echo "==> Tagging for version: ${VERSION}" - echo "::group::{Configure git credential store}" - git config --global credential.helper store - echo "https://${USERNAME}:${{secrets.RELEASE_TOKEN}}@git.montehaselino.de/DHBW/dhbw-abb-typst-template" > ~/.git-credentials - echo "::endgroup::" - echo "::group::{Configure git user identity}" git config --global user.name "${USERNAME}" git config --global user.email "${EMAIL}" - git remote set-url --push origin https://git.montehaselino.de/DHBW/dhbw-abb-typst-template - echo "::endgroup::" - echo "::group::{Modify metadata}" echo "==> Update typst.toml version" sed -i "/version/c\version = \"${VERSION#v}\"" typst.toml git add typst.toml -- 2.40.1