-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.66 KB
/
ubuntu-focal-update-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
name: Udpate Ubuntu Focal repo
on:
push:
branches:
- main
paths:
- repo/ubuntu/focal/pool/multiverse/*.deb
- .github/workflows/ubuntu-focal-update-repo.yml
workflow_dispatch:
inputs:
force_recreate_repo:
description: 'Force recreate Ubuntu repository'
required: false
type: boolean
default: false
jobs:
ubuntu-focal-update-repo:
runs-on: ubuntu-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v3
with:
lfs: true
sparse-checkout: |
repo/ubuntu/focal
scripts/ubuntu/focal
ssh-key: ${{ secrets.DEPLOY_SSH_KEY }}
- name: Update Ubuntu Focal repository
run: >
docker run --rm
-v ${{ github.workspace }}/repo/ubuntu/focal:/repo
-v ${{ github.workspace }}/scripts/ubuntu/focal:/scripts:ro
-e FORCE_RECREATE_REPO=$FORCE_RECREATE_REPO
-e GPG_SIGNING_KEY=$GPG_SIGNING_KEY
ubuntu:focal
/bin/bash /scripts/update-repo.sh
env:
FORCE_RECREATE_REPO: ${{ inputs.force_recreate_repo }}
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
- name: Commit Ubuntu Focal repo
run: |
git config --global user.name 'GitHub build bot'
git config --global user.email '[email protected]'
(git add repo/ubuntu/focal/dists/focal/Release* && git add repo/ubuntu/focal/dists/focal/InRelease && git add repo/ubuntu/focal/dists/focal/multiverse/binary-amd64/Packages* && git commit -m "[automated] Ubuntu Focal repo updated" && git push) || echo "No new packages found, skip updating."