Simplify patchinfo workflow
This commit is contained in:
parent
d66f34de9a
commit
4213b1e1d2
@ -6,39 +6,31 @@ on: [push]
|
|||||||
jobs:
|
jobs:
|
||||||
use-go-action:
|
use-go-action:
|
||||||
runs-on: tumbleweed
|
runs-on: tumbleweed
|
||||||
permissions:
|
|
||||||
# Give the default GITHUB_TOKEN write permission to commit and push the
|
|
||||||
# added or changed files to the repository.
|
|
||||||
contents: write
|
|
||||||
steps:
|
steps:
|
||||||
# We should provide go with our image already?
|
# To be obsoleted by a custom runner image
|
||||||
- name: Setup Go
|
|
||||||
uses: https://gitea-actions-autobuild:${{ secrets.ACTION_PASSWORD }}@src.suse.de/actions/github-setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '1.20'
|
|
||||||
# To be obsoleted
|
|
||||||
- run: |
|
- run: |
|
||||||
zypper ar http://download.suse.de/ibs/SUSE:/CA/openSUSE_Factory CA
|
zypper ar http://download.suse.de/ibs/SUSE:/CA/openSUSE_Factory CA
|
||||||
zypper ref
|
zypper ref
|
||||||
zypper in -y ca-certificates-suse ca-certificates-suse-ucs
|
zypper in -y ca-certificates-suse ca-certificates-suse-ucs go
|
||||||
# Generic action from GitHub to clone the product git repo
|
# Generic action from GitHub to clone the product git repo
|
||||||
- name: Checkout product
|
- name: Checkout product
|
||||||
uses: https://gitea-actions-autobuild:${{ secrets.ACTION_PASSWORD }}@src.suse.de/actions/github-actions-checkout@v4
|
uses: https://gitea-actions-autobuild:${{ secrets.REPO_READ }}@src.suse.de/actions/github-actions-checkout@v4
|
||||||
with:
|
with:
|
||||||
|
token: ${{ secrets.REPO_WRITE }}
|
||||||
repo-sha256: true
|
repo-sha256: true
|
||||||
# Updating incident numbers
|
|
||||||
- name: Update all new _patchinfo files
|
- name: Update all new _patchinfo files
|
||||||
uses: https://gitea-actions-autobuild:${{ secrets.ACTION_PASSWORD }}@src.suse.de/actions/patchinfo-numbering-action@v0
|
uses: https://gitea-actions-autobuild:${{ secrets.REPO_READ }}@src.suse.de/actions/patchinfo-numbering-action@v0
|
||||||
- name: Get last commit message
|
- name: Get last commit author
|
||||||
id: last-commit
|
id: last-commit
|
||||||
run: |
|
run: |
|
||||||
echo "author=$(git log -1 --pretty=\"%an <%ae>\")" >> $GITHUB_OUTPUT
|
echo "author=$(git log -1 --pretty='%an <%ae>')" >> $GITHUB_OUTPUT
|
||||||
- name: Commit changes back
|
- name: Commit changes back
|
||||||
uses: https://gitea-actions-autobuild:${{ secrets.ACTION_PASSWORD }}@src.suse.de/actions/stefanzweifel-git-auto-commit-action@v5
|
uses: https://gitea-actions-autobuild:${{ secrets.REPO_READ }}@src.suse.de/actions/stefanzweifel-git-auto-commit-action@v5
|
||||||
with:
|
with:
|
||||||
commit_user_name: gitea-actions-autobuild
|
commit_user_name: gitea-actions-autobuild
|
||||||
|
commit_user_email: autobuild+gitea@suse.de
|
||||||
commit_author: ${{ steps.last-commit.outputs.author }}
|
commit_author: ${{ steps.last-commit.outputs.author }}
|
||||||
commit_message: "Update incident numbers"
|
commit_message: "Update incident numbers [skip actions]"
|
||||||
commit_options: '--no-edit'
|
commit_options: '--no-edit'
|
||||||
|
skip_fetch: true
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user