-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 2 KB
/
update_apt_repository.yml
File metadata and controls
68 lines (58 loc) · 2 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Update APT repository
on:
workflow_dispatch:
inputs:
ci-run-id:
description: The ID of the run of the CI workflow that generated the artifacts to publish.
required: true
type: string
env:
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
REPO_ARCHITECTURES: |
amd64
arm64
jobs:
update-apt-repository:
name: Update APT repository
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
max-parallel: 1
matrix:
package-id:
- CLI
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
steps:
- name: 📥 Download ${{ matrix.package-id }} ${{ matrix.target }} Debian package
uses: dawidd6/action-download-artifact@v12
with:
repo: ComunidadAylas/PackSquash
run_id: ${{ inputs.ci-run-id }}
name: PackSquash ${{ matrix.package-id }} Debian package (${{ matrix.target }})
- name: 🔎 Get Debian package file name
uses: actions/github-script@v8
id: deb-file
with:
result-encoding: string
script: |
const globber = await glob.create('packsquash_*.deb')
return (await globber.glob())[0]
- name: 📦 Publish ${{ matrix.target }} Debian package
uses: jrandiny/apt-repo-action@v2.0.1
with:
repo_supported_version: stable
file_target_version: stable
page_branch: apt-repo
repo_folder: debian
github_token: ${{ secrets.GH_API_TOKEN }}
repo_supported_arch: ${{ env.REPO_ARCHITECTURES }}
file: ${{ steps.deb-file.outputs.result }}
public_key: ${{ secrets.APT_PUBLIC_KEY }}
private_key: ${{ secrets.APT_PRIVATE_KEY }}
key_passphrase: ${{ secrets.APT_PRIVATE_KEY_PASSPHRASE }}