-
Notifications
You must be signed in to change notification settings - Fork 200
49 lines (44 loc) · 1.34 KB
/
trigger-downstream-flake-sync.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
# _
# __| | __ _ ___
# / _` |/ _` |/ _ \
# | (_| | (_| | __/
# \__,_|\__,_|\___|
#
# Copyright (C) 2024 @daeuniverse <https://github.com/daeuniverse>
#
# This is a open-source software, liscensed under the AGPL-3.0 License.
# See /License for more information.
---
name: Trigger downstream sync workflow
on:
workflow_dispatch:
push:
branches:
- 'main'
env:
DOWNSTREAM_REPO: flake.nix
WORKFLOW_BRANCH: unstable
WORKFLOW_FILE: sync-upstream.yml
jobs:
dispatch-downstream-workflow:
runs-on: ubuntu-latest
steps:
- name: Generate GitHub auth token
# https://github.com/tibdex/github-app-token
id: generate_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.GH_APP_ID }}
private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}
- name: Dispatch
uses: convictional/[email protected]
with:
owner: ${{ github.repository_owner }}
repo: ${{ env.DOWNSTREAM_REPO }}
github_token: ${{ steps.generate_token.outputs.token }}
workflow_file_name: ${{ env.WORKFLOW_FILE }}
ref: ${{ env.WORKFLOW_BRANCH }}
client_payload: '{"project":"dae","branch":"${{ env.WORKFLOW_BRANCH }}"}'
trigger_workflow: true
propagate_failure: false
wait_workflow: false