Skip to content

Prefetch MoonBit

Prefetch MoonBit #162

Workflow file for this run

name: Prefetch MoonBit
on:
schedule:
- cron: '0 2 * * *' # *-*-* 02:00:00 UTC
workflow_dispatch:
permissions:
contents: write
jobs:
prefetch-moonbit:
name: Prefetch MoonBit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
ref: master
- name: Install Nix
uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Prefetch latest MoonBit
timeout-minutes: 5
run: ./scripts/fetch_toolchains.sh
- name: Prefetch latest vscode extension moonbit-lang
timeout-minutes: 5
run: ./scripts/fetch_extension.sh
- name: Check and commit changes
id: commit
continue-on-error: true
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add versions
git commit -m "versions: update"
- name: Push changes
if: steps.commit.outcome == 'success'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master