Skip to content

chore: Spring Boot 4 M2 (#175) #172

chore: Spring Boot 4 M2 (#175)

chore: Spring Boot 4 M2 (#175) #172

name: Refresh Branches
env:
GH_TOKEN: ${{ github.token }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
on:
push:
branches:
- v24.7
- v24.8
- v24.9
- v25.0
jobs:
build_assembly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: '3.9.6'
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- run: |
mvn -ntp -B -q clean package
cd assembly/target
ASSEMBLIES=$(ls *.zip | jq -R -s -c 'split("\n")[:-1]')
echo "ASSEMBLIES=$ASSEMBLIES" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: assemblies
path: assembly/target/walking-skeleton-*.zip
outputs:
assemblies: ${{ env.ASSEMBLIES }}
refresh_branch:
runs-on: ubuntu-latest
needs: build_assembly
strategy:
fail-fast: false
matrix:
assembly: ${{fromJson(needs.build_assembly.outputs.assemblies)}}
steps:
- run: |
VIEWS=$(echo "${{ matrix.assembly }}" | awk '{print substr($0, 18, length($0)-21)}')
echo "VIEWS=$VIEWS" >> $GITHUB_ENV
echo "BRANCH=${{ env.BRANCH_NAME }}-$VIEWS" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH }}
- name: Remove current files
run: |
rm -rf .mvn
rm -rf src
find . -maxdepth 1 -type f -delete
- uses: actions/download-artifact@v4
with:
name: assemblies
- name: Unzip assembly
run: |
unzip -o walking-skeleton-${{ env.VIEWS }}.zip
mv -f walking-skeleton/{.,}* .
rmdir walking-skeleton
rm walking-skeleton-*.zip
- name: Commit and push
run: |
git config --global user.email "[email protected]"
git config --global user.name "Vaadin Bot"
git status
git add --all
git commit -am "Refresh branch ${{ env.BRANCH }}"
git status
git push origin