From 38cf5a8b49cf1b6451571b7e6b420e78f11c60197a6f766032f61344b8dc4472 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 8 Oct 2025 14:44:05 +0200 Subject: [PATCH 1/4] add a patchinfo numerator for maintenance. --- .gitea/workflows/patchinfo_numberator.yaml | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitea/workflows/patchinfo_numberator.yaml diff --git a/.gitea/workflows/patchinfo_numberator.yaml b/.gitea/workflows/patchinfo_numberator.yaml new file mode 100644 index 0000000..0d7527a --- /dev/null +++ b/.gitea/workflows/patchinfo_numberator.yaml @@ -0,0 +1,31 @@ +# Use this as .gitea/workflows/patchinfo_numberator.yaml in all products/* repos +name: Patchinfo ID numberator +run-name: ${{ gitea.actor }} is setting patchinfo numbers +on: [push] + +jobs: + use-go-action: + runs-on: tumbleweed + steps: + # Generic action from GitHub to clone the product git repo + - name: Checkout product + uses: https://gitea-actions-autobuild:${{ secrets.REPO_READ }}@src.opensuse.org/actions/github-actions-checkout@v4 + with: + token: ${{ secrets.REPO_WRITE }} + repo-sha256: true + - name: Update all new _patchinfo files + uses: https://gitea-actions-autobuild:${{ secrets.REPO_READ }}@src.opensuse.org/actions/patchinfo-numbering-action@v0 + - name: Get last commit author + id: last-commit + run: | + echo "author=$(git log -1 --pretty='%an <%ae>')" >> $GITHUB_OUTPUT + - name: Commit changes back + uses: https://gitea-actions-autobuild:${{ secrets.REPO_READ }}@src.opensuse.org/actions/stefanzweifel-git-auto-commit-action@v5 + with: + commit_user_name: gitea-actions-autobuild + commit_user_email: autobuild+gitea@suse.de + commit_author: ${{ steps.last-commit.outputs.author }} + commit_message: "Update incident numbers [skip actions]" + commit_options: '--no-edit' + skip_fetch: true + -- 2.51.1 From 95db2a6cd21665aceb351ada7cba892ed94086917fffff193fe6bd6a8d4c7526 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 9 Oct 2025 09:32:29 +0200 Subject: [PATCH 2/4] merge from phub tree --- .gitea/workflows/patchinfo_numberator.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/patchinfo_numberator.yaml b/.gitea/workflows/patchinfo_numberator.yaml index 0d7527a..80cda5b 100644 --- a/.gitea/workflows/patchinfo_numberator.yaml +++ b/.gitea/workflows/patchinfo_numberator.yaml @@ -7,12 +7,18 @@ jobs: use-go-action: runs-on: tumbleweed steps: + # Install packages if not provided by image + - run: | + rpm -q go && exit 0 + zypper ref + zypper in -y go # Generic action from GitHub to clone the product git repo - name: Checkout product uses: https://gitea-actions-autobuild:${{ secrets.REPO_READ }}@src.opensuse.org/actions/github-actions-checkout@v4 with: token: ${{ secrets.REPO_WRITE }} repo-sha256: true + - name: Update all new _patchinfo files uses: https://gitea-actions-autobuild:${{ secrets.REPO_READ }}@src.opensuse.org/actions/patchinfo-numbering-action@v0 - name: Get last commit author @@ -23,7 +29,7 @@ jobs: uses: https://gitea-actions-autobuild:${{ secrets.REPO_READ }}@src.opensuse.org/actions/stefanzweifel-git-auto-commit-action@v5 with: commit_user_name: gitea-actions-autobuild - commit_user_email: autobuild+gitea@suse.de + commit_user_email: autobuild+gitea@opensuse.org commit_author: ${{ steps.last-commit.outputs.author }} commit_message: "Update incident numbers [skip actions]" commit_options: '--no-edit' -- 2.51.1 From 79018d763a92da6aff764d793fda51b0bbb89e69618f14c19c5399b846417cde Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 9 Oct 2025 10:01:55 +0200 Subject: [PATCH 3/4] use leap- prefix for ids --- .gitea/workflows/patchinfo_numberator.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/patchinfo_numberator.yaml b/.gitea/workflows/patchinfo_numberator.yaml index 80cda5b..2f8ef0b 100644 --- a/.gitea/workflows/patchinfo_numberator.yaml +++ b/.gitea/workflows/patchinfo_numberator.yaml @@ -21,6 +21,8 @@ jobs: - name: Update all new _patchinfo files uses: https://gitea-actions-autobuild:${{ secrets.REPO_READ }}@src.opensuse.org/actions/patchinfo-numbering-action@v0 + with: + prefix: leap- - name: Get last commit author id: last-commit run: | -- 2.51.1 From 4bdb211e97ab97d2d2a5204fdecd80387e2e3a2fba1d25ab4b5a7d0ca4a2440f Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 9 Oct 2025 10:11:25 +0200 Subject: [PATCH 4/4] simplify uses as we do not need read tokens --- .gitea/workflows/patchinfo_numberator.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/patchinfo_numberator.yaml b/.gitea/workflows/patchinfo_numberator.yaml index 2f8ef0b..a107459 100644 --- a/.gitea/workflows/patchinfo_numberator.yaml +++ b/.gitea/workflows/patchinfo_numberator.yaml @@ -14,13 +14,13 @@ jobs: zypper in -y go # Generic action from GitHub to clone the product git repo - name: Checkout product - uses: https://gitea-actions-autobuild:${{ secrets.REPO_READ }}@src.opensuse.org/actions/github-actions-checkout@v4 + uses: https://src.opensuse.org/actions/github-actions-checkout@v4 with: token: ${{ secrets.REPO_WRITE }} repo-sha256: true - name: Update all new _patchinfo files - uses: https://gitea-actions-autobuild:${{ secrets.REPO_READ }}@src.opensuse.org/actions/patchinfo-numbering-action@v0 + uses: https://src.opensuse.org/actions/patchinfo-numbering-action@v0 with: prefix: leap- - name: Get last commit author @@ -28,7 +28,7 @@ jobs: run: | echo "author=$(git log -1 --pretty='%an <%ae>')" >> $GITHUB_OUTPUT - name: Commit changes back - uses: https://gitea-actions-autobuild:${{ secrets.REPO_READ }}@src.opensuse.org/actions/stefanzweifel-git-auto-commit-action@v5 + uses: https://src.opensuse.org/actions/stefanzweifel-git-auto-commit-action@v5 with: commit_user_name: gitea-actions-autobuild commit_user_email: autobuild+gitea@opensuse.org -- 2.51.1