forked from containers/podman
-
Notifications
You must be signed in to change notification settings - Fork 0
132 lines (119 loc) · 4.32 KB
/
release.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: release-deb
on:
workflow_dispatch:
schedule:
- cron: '57 8 * * *'
jobs:
check_version:
runs-on: ubuntu-latest
outputs:
debexists: ${{ steps.version.outputs.debexists }}
podman_version: ${{ steps.version.outputs.podman_version }}
package_version: ${{ steps.version.outputs.package_version }}
steps:
- name: check version
id: version
run: |
echo $0
sudo apt-get install -qq -y jq
UPSTREAM_VERSION="$(curl --silent -f -o - https://api.github.com/repos/containers/podman/releases/latest | tee | jq -r '.tag_name')"
curl --silent -f -o Packages.gz https://NotBobTheBuilder.github.io/podman/Packages.gz
echo "Looking for version $UPSTREAM_VERSION in file"
if gzip -c -d Packages.gz | grep -v "X-Release-Branch: $UPSTREAM_VERSION"; then
echo 0 > debian_version
fi
DEBIAN_VERSION="$(curl --silent -f -o - https://notbobthebuilder.github.io/podman/debian_version)"
PACKAGE_VERSION="$UPSTREAM_VERSION-$DEBIAN_VERSION"
echo "Looking for version $PACKAGE_VERSION in file"
if gzip -c -d Packages.gz | grep "X-Release-Branch: $PACKAGE_VERSION"; then
DEB_EXISTS='true'
else
DEB_EXISTS='false'
fi
echo "debexists=$DEB_EXISTS" >> "$GITHUB_OUTPUT"
echo "podman_version=$UPSTREAM_VERSION" >> "$GITHUB_OUTPUT"
echo "package_version=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
echo "debexists=$DEB_EXISTS" >> "$GITHUB_STEP_SUMMARY"
echo "podman_version=$UPSTREAM_VERSION" >> "$GITHUB_STEP_SUMMARY"
echo "package_version=$PACKAGE_VERSION" >> "$GITHUB_STEP_SUMMARY"
make-deb:
needs: check_version
runs-on: ubuntu-latest
if: needs.check_version.outputs.debexists == 'false'
env:
ARCH: ${{ matrix.arch }}
PODMAN_VERSION: ${{ needs.check_version.outputs.podman_version }}
PACKAGE_VERSION: ${{ needs.check_version.outputs.package_version }}
strategy:
matrix:
include:
- arch: aarch64
distro: ubuntu_rolling
- arch: x86_64
distro: ubuntu_rolling
steps:
- name: checkout archive
uses: actions/checkout@v3
with:
repository: NotBobTheBuilder/podman
ref: gh-pages
- name: checkout podman
uses: actions/checkout@v3
with:
repository: containers/podman
ref: ${{ env.PODMAN_VERSION }}
path: podman
- name: build
uses: NotBobTheBuilder/run-on-arch-action@amd64-support
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
githubToken: ${{ github.token }}
dockerRunArgs: |
--mount type=bind,source="${PWD}/podman",target=/podman
--mount type=bind,source="${PWD}/build.bash",target=/build.bash
--mount type=bind,source="${PWD}/package.bash",target=/package.bash
run: |
/build.bash
- name: make deb
run: |
./package.bash
- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: deb-${{ matrix.arch }}
path: |
out/*.deb
retention-days: 1
update-archive:
runs-on: ubuntu-latest
needs: [ make-deb, check_version ]
if: needs.check_version.outputs.debexists == 'false'
env:
EMAIL: [email protected]
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PODMAN_VERSION: ${{ needs.check_version.outputs.version }}
steps:
- name: download artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: checkout archive
uses: actions/checkout@v3
with:
repository: NotBobTheBuilder/podman
ref: gh-pages
path: archive
- name: update archive
run: |
./archive/update-archive.bash
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
path: archive
labels: |
auto-nightly-build
title: Release Version ${{ needs.check_version.outputs.version }}
commit-message: Release Version ${{ needs.check_version.outputs.version }}
reviewers: NotBobTheBuilder
branch: auto-nightly-build