Build the filter🚀 #275
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: Build the filter🚀 | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "00 7 * * SAT" | |
# push: | |
# branches: ["main"] | |
jobs: | |
build: | |
if: github.actor == 'ammnt' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Checkout code📦 | |
uses: actions/[email protected] | |
- name: Install NodeJS🧱 | |
uses: actions/[email protected] | |
with: | |
node-version: 20 | |
cache: "npm" | |
- name: Get yarn cache directory🗑️ | |
id: yarn-cache-dir | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/[email protected] | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install yarn and run hostlist-compiler⛓️ | |
# if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: | | |
yarn install --prefer-offline | |
yarn run build | |
env: | |
CI: true | |
- name: Push the filter to repo✅ | |
if: ${{ github.event_name != 'pull_request' }} | |
run: | | |
git config --global user.name "ammnt" | |
git config --global user.email "[email protected]" | |
git add filter.txt | |
git commit -m "build: regular filter update" | |
git push |