either to check it produces no diff, or to manually trigger pushing any diff as a commmit to the current branch.
26 lines
1.1 KiB
YAML
26 lines
1.1 KiB
YAML
name: go-generate-push
|
|
on:
|
|
workflow_dispatch:
|
|
jobs:
|
|
go-generate-push:
|
|
name: go-generate-push
|
|
container:
|
|
image: registry.opensuse.org/devel/factory/git-workflow/containers/opensuse/bci/golang-extended:latest
|
|
steps:
|
|
- run: git clone --no-checkout --depth 1 ${{ gitea.server_url }}/${{ gitea.repository }} .
|
|
- run: git fetch origin ${{ gitea.ref }}
|
|
- run: git checkout FETCH_HEAD
|
|
- run: go generate -C common
|
|
- run: go generate -C workflow-pr
|
|
- run: go generate -C workflow-pr/interfaces
|
|
- run: |
|
|
host=${{ gitea.server_url }}
|
|
host=${host#https://}
|
|
echo $host
|
|
git remote set-url origin "https://x-access-token:${{ secrets.GITEA_TOKEN }}@$host/${{ gitea.repository }}"
|
|
git config user.name "Gitea Actions"
|
|
git config user.email "gitea_noreply@opensuse.org"
|
|
- run: 'git status --short; git status --porcelain=2|grep --quiet -v . || ( git add .;git commit -m "CI run result of: go generate"; git push origin HEAD:${{ gitea.ref }} )'
|
|
- run: git log -p FETCH_HEAD...HEAD
|
|
- run: git log --numstat FETCH_HEAD...HEAD
|