Skip to content

Sync v8-tag.txt

Sync v8-tag.txt #11

Workflow file for this run

name: Sync v8-tag.txt
on:
push:
branches: "main"
paths-ignore:
- README.md
- LICENSE
- .gitignore
- .github/**
- "!.github/workflows/sync-v8-tag.yml"
schedule:
- cron: "52 */6 * * *"
workflow_dispatch:
concurrency: ${{ github.workflow }}
jobs:
sync-v8-tag:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
v8-tag: ${{ steps.get-v8-tag.outputs.v8-tag }}
pushed: ${{ steps.add-commit-push.outputs.pushed }}
steps:
- uses: actions/checkout@v4
- uses: ./setup-depot_tools
- id: get-v8-sha
run: |
v8_sha=$(curl -fsSL https://chromiumdash.appspot.com/fetch_releases?channel=Stable \
| jq -r '.[0].hashes.v8')
echo "v8-sha=$v8_sha" >> "$GITHUB_OUTPUT"
- id: get-v8-tag
run: |
v8_tag=$(git ls-remote -t https://chromium.googlesource.com/v8/v8.git 2>/dev/null | grep "$V8_SHA" | cut -f2 | cut -d/ -f3 | head -n1)
echo "v8-tag=$v8_tag" >> "$GITHUB_OUTPUT"
echo "$v8_tag" > v8-tag.txt
env:
V8_SHA: ${{ steps.get-v8-sha.outputs.v8-sha }}
- id: add-commit-push
run: |
git config --global user.name "actions[bot]"
git config --global user.email "[email protected]"
git add -A
if git commit -m "Automated changes"; then
git push -u origin main
echo "pushed=true" >> "$GITHUB_OUTPUT"
else
echo "pushed=false" >> "$GITHUB_OUTPUT"
fi
gh-release-create:
needs: sync-v8-tag
if: fromJSON(needs.sync-v8-tag.outputs.pushed)
permissions:
contents: write
uses: ./.github/workflows/gh-release-create.yml
with:
v8-tag: ${{ needs.sync-v8-tag.outputs.v8-tag }}
secrets: inherit