generated from LizardByte/template-base
-
-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (59 loc) · 2.01 KB
/
build-repo.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
---
name: Build Pacman Repo
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
schedule:
- cron: "0 0 * * *"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
build-pacman-repo:
runs-on: ubuntu-latest
container:
image: archlinux/archlinux:base-devel
steps:
- name: Container Setup
run: |
pacman -Syu --disable-download-timeout --needed --noconfirm \
archlinux-keyring \
reflector \
wget
- name: Update mirrors
run: |
reflector --latest 10 --protocol http,https --sort rate --save /etc/pacman.d/mirrorlist
- name: Download Pacman Repo Builder
run: |
wget \
https://github.com/pacman-repo-builder/pacman-repo-builder/releases/download/0.0.0-rc.65/build-pacman-repo-x86_64-unknown-linux-gnu \
-O /usr/bin/build-pacman-repo
chmod +x /usr/bin/build-pacman-repo
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
ref: repo
path: repo
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, will fail to push refs to dest repo
- name: Build Pacman Repo
run: |
build-pacman-repo patch-makepkg --replace
build-pacman-repo build
- name: Update repo
run: |
mv tmp/* repo/
- name: GitHub Commit & Push
if: github.event_name == 'schedule' || github.event_name == 'push'
uses: actions-js/[email protected]
with:
author_email: ${{ secrets.GH_BOT_EMAIL }}
author_name: ${{ secrets.GH_BOT_NAME }}
branch: repo # commit to repo branch
directory: repo # use the repo directory
github_token: ${{ secrets.GH_BOT_TOKEN }}
message: 'Update per ${{ github.event_name }}: ${{ github.sha }}'