2021-09-11 09:37:29 +00:00
|
|
|
# This is a basic workflow to help you get started with Actions
|
|
|
|
|
|
|
|
name: Update Repository
|
|
|
|
|
|
|
|
# Controls when the workflow will run
|
|
|
|
on:
|
2021-09-11 11:38:55 +00:00
|
|
|
push:
|
|
|
|
# If the configuration has changed, this ensures we apply updates.
|
|
|
|
branches: [ main ]
|
2021-09-11 09:37:29 +00:00
|
|
|
|
2021-09-11 11:38:55 +00:00
|
|
|
schedule:
|
|
|
|
# Upstream releases around once per month, so twice a week should be fine.
|
|
|
|
- cron: '23 14 * * mon,thu'
|
2021-09-11 09:37:29 +00:00
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
|
|
jobs:
|
|
|
|
# This workflow contains a single job called "build"
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Install dependencies
|
2021-09-11 09:39:59 +00:00
|
|
|
run: sudo env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes gpg jq reprepro
|
2021-09-11 09:37:29 +00:00
|
|
|
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
# See https://github.com/marketplace/actions/github-push
|
|
|
|
persist-credentials: false
|
|
|
|
fetch-depth: 0
|
|
|
|
|
2021-09-11 10:32:50 +00:00
|
|
|
- name: Set up GPG keys
|
|
|
|
run: |
|
2021-09-11 11:16:10 +00:00
|
|
|
mkdir -p -m 0700 "$HOME/.gnupg"
|
2021-09-11 11:19:43 +00:00
|
|
|
echo 'pinentry-mode loopback' >>"$HOME/.gnupg/gpg.conf"
|
|
|
|
echo 'allow-loopback-pinentry' >>"$HOME/.gnupg/gpg-agent.conf"
|
|
|
|
echo 'allow-preset-passphrase' >>"$HOME/.gnupg/gpg-agent.conf"
|
2021-09-11 11:06:31 +00:00
|
|
|
gpgconf --reload gpg-agent
|
2021-09-11 10:32:50 +00:00
|
|
|
echo "${{ secrets.GPG_SIGNING_KEY }}" | gpg --quiet --batch --yes --import
|
2021-09-11 11:21:31 +00:00
|
|
|
echo '${{ secrets.GPG_SIGNING_PASSPHRASE }}' | /usr/lib/gnupg/gpg-preset-passphrase --preset 57F0E65446A301CC19914FD61167922350A2D8B2
|
2021-09-11 10:32:50 +00:00
|
|
|
|
2021-09-11 09:37:29 +00:00
|
|
|
- name: Download and include package files
|
2021-09-11 11:01:30 +00:00
|
|
|
run: ./addlatest
|
2021-09-11 09:37:29 +00:00
|
|
|
|
|
|
|
- name: Push changes
|
|
|
|
uses: ad-m/github-push-action@v0.6.0
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2021-09-11 09:51:17 +00:00
|
|
|
branch: ${{ github.ref }}
|