-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.91 KB
/
update-site.yml
File metadata and controls
61 lines (51 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Refresh Update_Site
on:
workflow_dispatch:
jobs:
build-and-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 21
- name: Build with Maven Tycho
run: mvn -B clean verify -DskipTests
- name: Copy update site content to update_site/
run: |
rm -rf update_site/*
mkdir -p update_site
for repo_target in sites/*.repo/target; do
name=$(basename "$(dirname "$repo_target")")
mkdir -p "update_site/$name"
cp -r "$repo_target/repository/"* "update_site/$name/"
done
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git config --global push.autoSetupRemote true
- name: Check for changes
id: changes
run: |
changed=$(git status --porcelain update_site | wc -l)
echo "changed=$changed" >> "$GITHUB_OUTPUT"
- name: Push changes if update_site changed
if: steps.changes.outputs.changed != '0'
run: |
git add -A update_site
git commit -m "build: Update update_site with latest build artifacts"
- name: Create Pull Request
if: steps.changes.outputs.changed != '0'
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update update_site with latest build artifacts
branch: 'update-site-update'
title: "build: Update update_site directory with latest build artifacts"
body: |
This PR updates the update_site directory with the latest build artifacts generated by Tycho build.
base: master