-
Notifications
You must be signed in to change notification settings - Fork 32
35 lines (32 loc) · 1.45 KB
/
build-p2-site.yaml
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
name: Build P2 Site
env:
TARGET: '2023-09-java21'
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
DEPLOY_SECRET: ${{ secrets.SSH_PRIVATE_KEY_ED25519_BASE64 }}
on:
push:
branches:
- 3.13
workflow_dispatch:
jobs:
build:
runs-on: [self-hosted, Linux, x64, Docker]
steps:
- uses: actions/checkout@v4
- name: pull docker image docker-build:${{ env.TARGET }}
run: docker pull ghcr.io/elexis/docker-build:${{ env.TARGET }}
- name: build using docker image docker-build:${{ env.TARGET }}
run: docker run --rm --init -v "$(pwd)":/usr/src/mymaven -v "$(eval echo ~$USER)/m2-${{ env.BRANCH_NAME }}":/root/.m2 -w /usr/src/mymaven ghcr.io/elexis/docker-build:${{ env.TARGET }} xvfb-run mvn -V -T 1C clean verify -B
- name: upload artifacts
run: |
eval $(ssh-agent -s)
ssh-add <(echo "${{ env.DEPLOY_SECRET }}" | base64 -d)
rsync -aiv --delete --mkpath -e ssh ch.elexis.base.p2site/target/repository/ [email protected]:download.elexis.info/elexis/${{ env.BRANCH_NAME }}/p2/elexis-3-base/
eval $(ssh-agent -k)
- name: Trigger elexis-3-server Workflow
run: |
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.TRIGGER_WORKFLOW_TOKEN }}" \
https://api.github.com/repos/elexis/elexis-3-server/actions/workflows/build-p2-site.yaml/dispatches \
-d '{"ref":"${{ env.BRANCH_NAME }}"}'