.github/workflows/bump.yml #434
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
on: | |
push: | |
schedule: | |
# ~6am AEST | |
- cron: "19 19 * * *" | |
jobs: | |
bump_versions: | |
name: Bump Browser Versions | |
runs-on: | |
ubuntu-latest | |
env: | |
# https://stackoverflow.com/a/71158878/2014893 | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: Install Nix via Cachix | |
if: env.using_self_hosted_runner_with_nix != 'true' | |
uses: cachix/install-nix-action@v30 | |
with: | |
install_url: "https://releases.nixos.org/nix/nix-2.21.0/install" | |
- name: Run the Magic Nix Cache # https://determinate.systems/posts/magic-nix-cache | |
uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Check Nix flake inputs | |
uses: DeterminateSystems/flake-checker-action@v9 | |
with: | |
fail-mode: false | |
- name: pull dev environment | |
run: | | |
nix develop --command \ | |
echo dev environment ready | |
- name: prep git | |
run: | | |
set -e | |
git fetch | |
git config --global user.name 'BumpBot' | |
git config --global user.email '[email protected]' | |
- name: update google-chrome | |
run: | | |
echo branch_name is "$BRANCH_NAME" | |
if [[ "$BRANCH_NAME" == "main" ]]; then | |
nix develop --command \ | |
./google-chrome/update.py --commit | |
else | |
echo "not on branch 'main'; skipping update.py." | |
fi | |
- name: check build outputs | |
env: | |
NIXPKGS_ALLOW_UNFREE: "1" | |
run: | | |
nix flake check --impure | |
- name: push to origin | |
run: git push |