Move release from cockpituous to action-release and packit

This gets rid of our "release" environment with high-profile secrets,
and the cockpituous/release infra.

The upstream release uses our shared
https://github.com/cockpit-project/action-release/ action.
This commit is contained in:
Martin Pitt 2022-06-07 09:35:28 +02:00 committed by Allison Karlitskaya
parent 607fbae9d2
commit f5faff051b
4 changed files with 61 additions and 68 deletions

View file

@ -1,3 +1,6 @@
# Create a GitHub upstream release. Replace "TARNAME" with your project tarball
# name and enable this by dropping the ".disabled" suffix from the file name.
# See README.md.
name: release
on:
push:
@ -5,31 +8,27 @@ on:
# this is a glob, not a regexp
- '[0-9]*'
jobs:
cockpituous:
source:
runs-on: ubuntu-latest
environment: release
container:
image: ghcr.io/cockpit-project/release
image: ghcr.io/cockpit-project/unit-tests
options: --user root
permissions:
# create GitHub release
contents: write
steps:
- name: Set up configuration and secrets
run: |
# override GitHub's bind mount from host, we don't want anything from there and it interferes with ssh
export HOME=$(getent passwd $(id -u) | cut -f6 -d:)
- name: Clone repository
uses: actions/checkout@v3
with:
fetch-depth: 0
# secrets come from https://github.com/organizations/ORGNAME/settings/secrets or https://github.com/OWNER/REPO/settings/secrets
# see https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
echo '${{ secrets.SSH_KNOWN_HOSTS }}' > ~/.ssh/known_hosts
echo '${{ secrets.FEDPKG_SSH_PUBLIC }}' > ~/.ssh/id_rsa.pub
echo '${{ secrets.FEDPKG_SSH_PRIVATE }}' > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
# FIXME: Set your Fedora user account name here
echo 'yourfedorauser' > ~/.config/bodhi-user
echo '${{ secrets.GITHUB_TOKEN }}' > ~/.config/github-token
echo '${{ secrets.FEDORA_PASSWORD }}' > ~/.fedora-password
- name: Workaround for https://github.com/actions/checkout/pull/697
run: git fetch --force origin $(git describe --tags):refs/tags/$(git describe --tags)
- name: Run cockpituous
run: |
# override GitHub's bind mount from host, we don't want anything from there and it interferes with ssh
export HOME=$(getent passwd $(id -u) | cut -f6 -d:)
cd /build
release-runner -r https://github.com/$GITHUB_REPOSITORY -t $(basename $GITHUB_REF) ./cockpituous-release
- name: Build release
run: make dist
- name: Publish GitHub release
uses: cockpit-project/action-release@62db9d9850a1adec300500d84035c4f523fd5290
with:
filename: "TARNAME-${{ github.ref_name }}.tar.xz"