-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (59 loc) · 1.52 KB
/
main.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
59
60
61
62
name: CI
on:
push:
branches:
- master
env:
IMAGE_NAME: "nebula-api"
MVN_REPO_SERVER_ID: "startail-public"
jobs:
maven:
name: deploy-maven
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "adopt"
- name: Build and Deploy
run: |
cat <<EOT > ~/.m2/settings.xml
<settings>
<servers>
<server>
<id>${{ env.MVN_REPO_SERVER_ID }}</id>
<username>${{ secrets.MVN_REPO_USERNAME }}</username>
<password>${{ secrets.MVN_REPO_PASSWORD }}</password>
</server>
</servers>
</settings>
EOT
bash ./nebulapb/make-java.sh deploy
build:
name: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Build and push"
uses: docker/build-push-action@v2
with:
context: "."
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest