added workflow_dispatch

to allow the bot to create the APT repository itself
This commit is contained in:
Paulchen-Panther 2023-05-14 16:29:57 +02:00
parent 2a17de37f1
commit 54d03b8065
2 changed files with 28 additions and 7 deletions

View File

@ -1,6 +1,26 @@
name: Hyperion APT Build
on:
workflow_call:
inputs:
head_sha:
type: string
description: The branch, tag or SHA to checkout
required: true
secrets:
APT_GPG:
required: true
APT_USER:
required: true
APT_PASSWORD:
required: true
APT_DRAFT:
required: true
workflow_dispatch:
inputs:
head_sha:
type: string
description: The branch, tag or SHA to checkout
required: true
secrets:
APT_GPG:
required: true
@ -36,6 +56,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.head_sha || github.event.client_payload.head_sha }}
submodules: true
- name: Generate environment variables
@ -73,7 +94,7 @@ jobs:
cp ../hyperion_*.deb /deploy"
- name: Upload package artifact
if: startsWith(github.event.ref, 'refs/tags')
if: ${{ startsWith(github.event.ref, 'refs/tags') || github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v3
with:
path: deploy
@ -81,12 +102,14 @@ jobs:
publish:
name: Publish APT packages
if: startsWith(github.event.ref, 'refs/tags')
if: ${{ startsWith(github.event.ref, 'refs/tags') || github.event_name == 'workflow_dispatch' }}
needs: [setup, build]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.head_sha || github.event.client_payload.head_sha }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5.2.0

View File

@ -195,8 +195,6 @@ jobs:
if: startsWith(github.event.ref, 'refs/tags')
needs: [Linux, macOS, windows]
uses: ./.github/workflows/apt.yml
secrets:
APT_GPG: ${{ secrets.APT_GPG }}
APT_USER: ${{ secrets.APT_USER }}
APT_PASSWORD: ${{ secrets.APT_PASSWORD }}
APT_DRAFT: ${{ secrets.APT_DRAFT }}
secrets: inherit
with:
head_sha: master