Skip to content

#1233: honour the home tag and merge package members before transpiling #3178

#1233: honour the home tag and merge package members before transpiling

#1233: honour the home tag and merge package members before transpiling #3178

Workflow file for this run

# SPDX-FileCopyrightText: Copyright (c) 2022-2026 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
name: grunt
"on":
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: grunt-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
os: [windows-2022, ubuntu-24.04, macos-15]
java: [22]
node: [18]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node }}
- uses: actions/setup-java@v6
with:
distribution: "zulu"
java-version: ${{ matrix.java }}
- name: Install phino (Linux)
if: matrix.os == 'ubuntu-24.04'
run: |
curl -fsSL -o phino http://phino.objectionary.com/releases/ubuntu-22.04/phino-latest
chmod +x phino
sudo mv phino /usr/local/bin/phino
- name: Install phino (macOS)
if: matrix.os == 'macos-15'
run: |
curl -fsSL -o phino http://phino.objectionary.com/releases/macos-15/phino-latest
chmod +x phino
sudo mv phino /usr/local/bin/phino
- name: Install phino (Windows)
if: matrix.os == 'windows-2022'
run: |
Invoke-WebRequest -Uri http://phino.objectionary.com/releases/windows-2022/phino-latest.exe -OutFile phino.exe
Move-Item phino.exe C:\Windows\System32\phino.exe
shell: powershell
- run: npm install
- run: npx grunt
telegram:
needs: build
runs-on: ubuntu-24.04
if: ${{ failure() && github.ref == 'refs/heads/master' }}
permissions:
actions: read
steps:
- id: elapsed
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
seconds=$(gh api "/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs" \
--jq '[ .jobs[] | select(.completed_at) ]
| (map(.completed_at | fromdate) | max) - (map(.started_at | fromdate) | min)
| [ ., 0 ] | max')
echo "This run took ${seconds} seconds"
echo "seconds=${seconds}" >> "${GITHUB_OUTPUT}"
- uses: appleboy/telegram-action@master
with:
to: -1004371404002
token: ${{ secrets.TELEGRAM_TOKEN }}
message: "⚠️ Grunt build of ${{ github.repository }} [failed](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) in ${{ steps.elapsed.outputs.seconds }}s."
disable_web_page_preview: true
format: markdown
recovered:
needs: build
runs-on: ubuntu-24.04
if: ${{ success() && github.ref == 'refs/heads/master' }}
permissions:
actions: read
steps:
- id: elapsed
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
seconds=$(gh api "/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs" \
--jq '[ .jobs[] | select(.completed_at) ]
| (map(.completed_at | fromdate) | max) - (map(.started_at | fromdate) | min)
| [ ., 0 ] | max')
echo "This run took ${seconds} seconds"
echo "seconds=${seconds}" >> "${GITHUB_OUTPUT}"
- id: previous
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
for _ in 1 2 3 4 5 6; do
state=$(gh api "/repos/${{ github.repository }}/actions/workflows/grunt.yml/runs?branch=${{ github.ref_name }}&per_page=100" \
--jq 'if any(.workflow_runs[]; .id == ${{ github.run_id }})
then [ .workflow_runs[]
| select(.id < ${{ github.run_id }})
| select(.conclusion == "failure" or .conclusion == "success") ][0].conclusion // "none"
else "stale" end')
[ "${state}" = 'stale' ] || break
sleep 10
done
echo "The previous run of this workflow: ${state}"
if [ "${state}" = 'failure' ]; then
echo 'broken=yes' >> "${GITHUB_OUTPUT}"
fi
- if: ${{ steps.previous.outputs.broken == 'yes' }}
uses: appleboy/telegram-action@master
with:
to: -1004371404002
token: ${{ secrets.TELEGRAM_TOKEN }}
message: "🍓 Grunt build of ${{ github.repository }} [recovered](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) in ${{ steps.elapsed.outputs.seconds }}s."
disable_web_page_preview: true
format: markdown