Skip to content

Update Boluo Images #36

Update Boluo Images

Update Boluo Images #36

name: Update Boluo Images
on:
workflow_run:
workflows: ['Check']
types: [completed]
branches:
- 'production'
jobs:
update-images:
runs-on: ubuntu-latest
steps:
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.UPDATE_IMAGES_KEY }}
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: 'mythal/boluo-images'
ssh-key: ${{ secrets.UPDATE_IMAGES_KEY }}
- uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Update the flake
run: |
nix flake lock --update-input boluo-production
- name: Commit and push changes
run: |
# Exit if there are no changes
git diff --exit-code && exit 0
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Automated update the flake via GitHub Actions"
git push origin master