-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (52 loc) · 1.64 KB
/
maven.yml
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
name: LaBoulangerieAPI continuous delivery
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache m2 repository
uses: actions/cache@v2
env:
cache-name: cache-m2-repository
with:
path: ~/.m2
key: ${{ github.repository }}-build-${{ env.cache-name }}-${{ hashFiles('pom.xml') }}
- name: JDk 1.17 setup
uses: actions/setup-java@v1
with:
java-version: 1.17
- uses: s4u/[email protected]
with:
servers: |
[{
"id": "laboulangeriemmo",
"username": "${{ secrets.GH_EMAIL }}",
"password": "${{ secrets.GH_READ_PACKAGES }}"
}]
- name: Maven build
run: mvn clean package
- uses: actions/upload-artifact@v1
with:
name: laboulangeriecore
path: target
deploy:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/download-artifact@v2
with:
name: laboulangeriecore
- name: Clone Plugins Project
run: |
git config --global user.email "[email protected]"
git config --global user.name "ci"
git clone https://ci:${{ secrets.GH_TOKEN }}@git.laboulangerie.net/ci/plugins.git
cp LaBoulangerieAPI-jar-with-dependencies.jar plugins/LaBoulangerieAPI.jar
cd plugins/
git add .
git commit -m "workflow $GITHUB_RUN_ID from $GITHUB_REPOSITORY"
git push https://ci:${{ secrets.GH_TOKEN }}@git.laboulangerie.net/ci/plugins.git HEAD:master