builder #652
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: builder | |
on: | |
push: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
builder: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DECODE_BUNDLE_URLS: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Java (Zulu 11) | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: Setup Node 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Get Liferay Lib | |
working-directory: ./src/better-json-builder | |
run: | | |
curl -LJO https://github.com/liferay/liferay-portal/raw/master/modules/sdk/gradle-plugins-workspace/lib/com.liferay.workspace.bundle.url.codec-1.0.0.jar | |
- name: Build JSON files | |
working-directory: ./src/better-json-builder | |
run: | | |
npm i | |
npm start | |
- name: Download default product info | |
run: curl -O https://releases-cdn.liferay.com/tools/workspace/.product_info.json | |
- name: Download releases info | |
run: curl -O https://releases.liferay.com/releases.json | |
- name: Commit JSON Files | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
git add -f .product_info.json | |
git add *.json | |
git commit -am "chore: auto update json files" || echo "We're good for now. See you next time!" | |
git pull --rebase | |
git push | |
fetch-releases-and-deps: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: Fetch Latest Versions | |
run: go run src/main.go | |
- name: Commit JSON Files | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
git add com.liferay.gradle.plugins.workspace | |
git commit -am "chore: auto update deps files" || echo "We're good for now. See you next time!" | |
git add releases | |
git commit -am "chore: auto update releases" || echo "We're good for now. See you next time!" | |
git add quarterly_releases_dates.json | |
git add quarterly_releases_dates.csv | |
git commit -am "chore: auto update quarterly releases dates" || echo "We're good for now. See you next time!" | |
git pull --rebase | |
git push |