-
Notifications
You must be signed in to change notification settings - Fork 89
47 lines (44 loc) · 1.61 KB
/
Copy pathgobump.yml
File metadata and controls
47 lines (44 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
name: "Updates Go dependencies via gobump"
on: # yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
# Every Sunday at 15:00
- cron: "0 15 * * 0"
jobs:
update-and-push:
runs-on: ubuntu-latest
container: registry.fedoraproject.org/fedora:43
steps:
- name: Prepare environment and run tests
run: |
set -xe
sudo dnf -y install git gh golang skopeo libvirt-devel gpgme-devel btrfs-progs-devel krb5-devel
git clone --depth 1 https://github.com/osbuild/image-builder
cd image-builder/
go build ./...
go test ./...
- name: Run gobump and open a PR
env:
GH_TOKEN: ${{ secrets.SCHUTZBOT_GITHUB_ACCESS_TOKEN }}
run: |
set -xe
cd image-builder/
git config user.name "schutzbot"
git config user.email "schutzbot@gmail.com"
branch="schutz-gobump-$(date -I)"
git checkout -b "${branch}"
go run github.com/lzap/gobump@latest \
-exec "go build ./..." \
-exec "go test ./..." \
-exec "./tools/prepare-source.sh" \
-exec "./tools/gen-manifest-checksums.sh" \
-verbose -format markdown | tee "/tmp/github_pr_body.txt"
git log --oneline "main..${branch}"
git push -f "https://$GH_TOKEN@github.com/schutzbot/image-builder.git" "${branch}"
gh pr create \
-t "Update dependencies $(date -I)" \
-F "/tmp/github_pr_body.txt" \
--repo "osbuild/image-builder" \
--base "main" \
--head "schutzbot:${branch}"