Skip to content

Commit 7e839ba

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents bc2a238 + 3f8845d commit 7e839ba

13 files changed

Lines changed: 715 additions & 628 deletions

File tree

.github/workflows/manual.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ env:
3030
jobs:
3131
update:
3232
runs-on: ubuntu-latest
33-
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
33+
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' }}
3434

3535
permissions:
3636
contents: write
@@ -64,13 +64,18 @@ jobs:
6464
fileName: "*.zst"
6565
tarBall: false
6666
zipBall: false
67+
out-file-path: ".bkg"
6768

6869
- name: Dry run
6970
id: update
7071
run: |
72+
set +e
7173
docker run -v $PWD:/app --env-file <(env | grep GITHUB) \
7274
ghcr.io/$GITHUB_OWNER/$GITHUB_REPO:master \
73-
src/test/update.sh; echo "updated=$?" >> "$GITHUB_OUTPUT"
75+
src/test/update.sh bkg
76+
code=$?
77+
echo "updated=$code" >> "$GITHUB_OUTPUT"
78+
exit "$code"
7479
7580
- name: Get date
7681
id: date
@@ -80,8 +85,8 @@ jobs:
8085
if: ${{ steps.update.outputs.updated == '0' }}
8186
uses: ncipollo/release-action@v1
8287
with:
83-
artifacts: "*.zst"
84-
bodyFile: "CHANGELOG.md"
88+
artifacts: "bkg/*.zst"
89+
bodyFile: "bkg/CHANGELOG.md"
8590
tag: "v${{ steps.date.outputs.tag }}"
8691
commit: "master"
8792
allowUpdates: true

.github/workflows/update.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,18 @@ jobs:
5656
fileName: "*.zst"
5757
tarBall: false
5858
zipBall: false
59+
out-file-path: ".bkg"
5960

6061
- name: Dry run
6162
id: update
6263
run: |
64+
set +e
6365
docker run -v $PWD:/app --env-file <(env | grep GITHUB) \
6466
ghcr.io/ipitio/backage:master \
65-
src/test/update.sh; echo "updated=$?" >> "$GITHUB_OUTPUT"
67+
src/test/update.sh bkg
68+
code=$?
69+
echo "updated=$code" >> "$GITHUB_OUTPUT"
70+
exit "$code"
6671
6772
- name: Get date
6873
id: date
@@ -72,8 +77,8 @@ jobs:
7277
if: ${{ steps.update.outputs.updated == '0' }}
7378
uses: ncipollo/release-action@v1
7479
with:
75-
artifacts: "*.zst"
76-
bodyFile: "CHANGELOG.md"
80+
artifacts: "bkg/*.zst"
81+
bodyFile: "bkg/CHANGELOG.md"
7782
tag: "v${{ steps.date.outputs.tag }}"
7883
commit: "master"
7984
allowUpdates: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
index/
22
index.db*
3+
*.db*

README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Otherwise, if this is a fork, you'd prefer an alternative method, or your packag
2828
> [!TIP]
2929
> You only need to add names to the queue; IDs are fetched as needed and entries are removed once processed.
3030
31-
New packages won't be added until *all* existing ones are refreshed; you should also create an independent instance that'll update faster and more frequently. Simply fork just the `master` branch, choose one of the following options, and use the [Alternative URL](#alternative-url) when it changes. This centralized repo will then serve as a backup for all subsets of packages not in `optout.txt`.
31+
New packages may not be added until *all* existing ones are refreshed; you should also create an independent instance that'll update faster and more frequently. Simply fork just the `master` branch, choose one of the following options, and use the [Alternative URL](#alternative-url) when it changes. This centralized repo will then serve as a backup for all subsets of packages not in `optout.txt`.
3232

3333
> [!IMPORTANT]
3434
> Your own packages will be picked up automatically! If you need to edit `owners.txt`, do so after the first run.
@@ -49,12 +49,7 @@ This will use a lot of minutes on GitHub-hosted runners, so you may want to use
4949
This is an example for `systemd`; adapt it to your needs. Please note:
5050

5151
- Docker needs to be installed
52-
- You don't need to set `GITHUB_TOKEN` if you first log in with `gh` or use your PAT to run:
53-
54-
```bash
55-
git clone --depth=1 -b master --single-branch [https|ssh]://<PAT>@github.com/pkgforge-dev/backage /opt/backage/master
56-
```
57-
52+
- You don't need to set `GITHUB_TOKEN` if you first log in with `gh`
5853
- `-m 0` ensures only the public packages of the owners you've added are updated (default)
5954
- You'll need the proper permissions to update private packages
6055
- `-d 0` allows everything to be updated in one go
@@ -74,7 +69,7 @@ ExecStart=/usr/bin/sh -c ' \\
7469
GITHUB_TOKEN=<PAT> ;\\
7570
GITHUB_OWNER=<username> ;\\
7671
GITHUB_REPO=backage ;\\
77-
GITHUB_BRANCH= ;\\
72+
GITHUB_BRANCH=master ;\\
7873
BKG_PATH=\$GITHUB_REPO/\$GITHUB_BRANCH ;\\
7974
mkdir -p /opt/\$BKG_PATH ;\\
8075
docker run -v /opt/\$BKG_PATH:/app \\

0 commit comments

Comments
 (0)