Skip to content

Fix remove synchronize from github action #6

Fix remove synchronize from github action

Fix remove synchronize from github action #6

Workflow file for this run

name: Update Lotus Version
on:
workflow_dispatch: # Allows manual trigger
pull_request:
types: [opened, reopened]
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Get latest Lotus version
id: get-version
run: |
# Get all releases and find the first one starting with 'v'
RELEASE_INFO=$(curl -s "https://api.github.com/repos/filecoin-project/lotus/releases" | \
jq -r '[.[] | select(.tag_name | startswith("v"))] | first')
# Extract the tag name
TAG_NAME=$(echo "$RELEASE_INFO" | jq -r .tag_name)
# Extract version number (remove 'v' prefix)
LATEST_VERSION=$(echo $TAG_NAME | sed 's/^v//')
echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
- name: Run update script
run: |
node update-versions.js ${{ env.LATEST_VERSION }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: 'Chore: update Lotus version references to ${{ env.LATEST_VERSION }}'
title: 'Chore: update Lotus version references to ${{ env.LATEST_VERSION }}'
body: |
Automated PR to update Lotus version references to ${{ env.LATEST_VERSION }}
This PR was automatically generated by GitHub Actions.
branch: update-lotus-version
base: main
delete-branch: true