Skip to content

Commit

Permalink
ci(copr): use copr-ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Oct 9, 2024
1 parent dff1cd4 commit 42e9699
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 103 deletions.
52 changes: 12 additions & 40 deletions .github/workflows/ci-copr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,49 +13,21 @@ on:
types:
- prereleased
- released
workflow_dispatch:

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
build:
name: Copr build
if: github.repository_owner == 'LizardByte'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get properties
env:
COPR_PR_WH_KEY: "05fc9b07-a19b-4f83-89b2-ae1e7e0b5282"
run: |
# package name = repository name
package=${{ github.event.repository.name }}
copr_base="https://copr.fedorainfracloud.org/webhooks/custom-dir/lizardbyte"
# release and released type
if [ "${{ github.event_name }}" = "release" ]; then
if [ "${{ github.event.action }}" = "prereleased" ]; then
COPR_PUSH_WEBHOOK="${copr_base}/beta/${{ secrets.COPR_BETA_WEBHOOK_TOKEN }}/${package}/"
elif [ "${{ github.event.action }}" = "released" ]; then
COPR_PUSH_WEBHOOK="${copr_base}/stable/${{ secrets.COPR_STABLE_WEBHOOK_TOKEN }}/${package}/"
fi
elif [ "${{ github.event_name }}" = "pull_request" ]; then
COPR_PR_WEBHOOK="${copr_base}/pulls:pr:${{github.event.number}}/${{env.COPR_PR_WH_KEY}}/${package}/"
fi
echo "COPR_PUSH_WEBHOOK=${COPR_PUSH_WEBHOOK}" >> $GITHUB_ENV
echo "COPR_PR_WEBHOOK=${COPR_PR_WEBHOOK}" >> $GITHUB_ENV
echo "COPR_PUSH_WEBHOOK=${COPR_PUSH_WEBHOOK}"
echo "COPR_PR_WEBHOOK=${COPR_PR_WEBHOOK}"
- name: Build
run: |
curl https://raw.githubusercontent.com/praiskup/copr-ci-tooling/main/copr-gh-actions-submit > submit
# if a PR number is added the script will use the PR webhook, otherwise it will use the push webhook
bash submit ${{ github.event.pull_request.number }}
call-copr-ci:
uses: LizardByte/copr-ci/.github/workflows/copr-ci.yml@master
with:
copr_pr_webhook_token: "05fc9b07-a19b-4f83-89b2-ae1e7e0b5282"
github_org_owner: LizardByte
copr_ownername: lizardbyte
auto_update_package: true
job_timeout: 60
secrets:
COPR_BETA_WEBHOOK_TOKEN: ${{ secrets.COPR_BETA_WEBHOOK_TOKEN }}
COPR_STABLE_WEBHOOK_TOKEN: ${{ secrets.COPR_STABLE_WEBHOOK_TOKEN }}
COPR_CLI_CONFIG: ${{ secrets.COPR_CLI_CONFIG }}
62 changes: 0 additions & 62 deletions packaging/linux/fedora/copr-build.sh

This file was deleted.

2 changes: 1 addition & 1 deletion packaging/linux/fedora/sunshine.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

Name: Sunshine
Version: %{build_version}
Summary: Self-hosted game stream host for Moonlight.
Release: 1%{?dist}
Summary: Self-hosted game stream host for Moonlight.
License: GPLv3-only
URL: https://github.com/LizardByte/Sunshine
Source0: tarball.tar.gz
Expand Down

0 comments on commit 42e9699

Please sign in to comment.