release-deb #682
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |