-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.74 KB
/
graalvm.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
54
55
56
57
58
name: Release
on:
push:
branches: ["main"]
permissions: write-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.m2
key: ${{ runner.os }}-maven-test-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-test-
- uses: graalvm/setup-graalvm@v1
with:
java-version: "21"
distribution: "graalvm"
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: s4u/[email protected]
with:
servers: '[{"id": "github", "username": "${{ secrets.MAVEN_USER }}", "password": "${{ secrets.MAVEN_TOKEN }}"}]'
repositories: '[{"id":"github","name":"github","url":"https://maven.pkg.github.com/opendonationassistant/oda-libraries","snapshots":{"enabled":true}}]'
- name: Build with Maven
run: mvn -q -B package -Dpackaging=native-image -DskipTests
- name: Docker login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/opendonationassistant/oda-payment-processing:${{ github.RUN_NUMBER }}
- name: Deploying new version
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
port: ${{ secrets.PORT }}
script: sh ~/update_processing.sh ${{ github.RUN_NUMBER }}