-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (75 loc) · 2.9 KB
/
package.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
on:
push:
tags:
- '*.*.*'
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
package_and_update_repository:
runs-on: ubuntu-latest
permissions:
contents: write
container:
image: debian:experimental
steps:
- name: Create Release
uses: ncipollo/release-action@v1
- name: Install Packages & set environment
run: |
apt update
apt install -t experimental reprepro git make build-essential libpam0g-dev sudo -y
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
echo "ARCH=amd64" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v4
- name: Build
run: make package
- name: Upload Release Asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: package/libpam-daily-word_${{ github.ref_name }}_amd64.deb
asset_name: libpam-daily-word_${{ github.ref_name }}_amd64.deb
overwrite: false
- name: Update Repository
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
echo "$GPG_PRIVATE_KEY" | tr '|' '\n' | gpg --batch --yes --import --verbose
gpg --verbose --pinentry-mode loopback -su 'manindark@own.manindark.me' --batch --passphrase "$GPG_PASSPHRASE" list
reprepro -b repository/debian includedeb bookworm package/libpam-daily-word_${{ github.ref_name }}_amd64.deb
git config --global --add safe.directory /__w/pam_daily_word/pam_daily_word
- uses: EndBug/add-and-commit@v9
with:
add: "repository/debian"
message: apt repository update
committer_name: GitHub Actions
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
new_branch: main
deploy_github_pages:
runs-on: ubuntu-latest
needs: package_and_update_repository
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './repository'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4