update-openshift-packages #50
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-openshift-packages | |
on: | |
workflow_dispatch: # allows manual triggering | |
schedule: | |
- cron: '0 1 * * 0' # runs weekly on Sunday at 00:00 | |
jobs: | |
refresh-packages: | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'vdemeester' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v16 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
nix_path: nixpkgs=channel:nixos-unstable | |
- name: Configure Git | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
- name: Update inputs | |
run: | | |
./update | |
- name: Push commit with updated inputs | |
run: | | |
git status | |
git add repos | |
git commit -m "Auto-update packages" | |
git pull --rebase --autostash | |
git push |