Update pacman configurations #378
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update pacman configurations | |
on: | |
schedule: | |
- cron: '29 3 * * *' | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
container: | |
image: archlinux | |
steps: | |
- name: Get time | |
id: time | |
run: echo "::set-output name=time::$(date +%F-%T)" | |
- name: Set up cache | |
uses: actions/cache@master | |
with: | |
path: /var/cache/pacman/pkg | |
key: pacman-cache-${{ steps.time.outputs.time }} | |
restore-keys: pacman-cache- | |
- name: Update package database | |
run: | | |
pacman -Sy | |
- name: Install runtime dependencies | |
run: | | |
pacman -S --noconfirm git | |
- uses: actions/checkout@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: petronny/git-config-user@master | |
- name: Update pacman configurations | |
run: | | |
./update-pacman-conf.sh | |
git add . | |
git commit -m "Updated pacman configurations" || exit 0 | |
git push |