forked from wushuo894/ani-rss
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (53 loc) · 1.62 KB
/
Copy pathdeploy-test.yml
File metadata and controls
54 lines (53 loc) · 1.62 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
name: deploy-test
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Project
run: |
bash ./package.sh
version=$(cat ani-rss-application/pom.xml | grep -oPm1 '(?<=<version>).*?(?=</version>)')
echo "version=v$version" >> $GITHUB_ENV
- name: Upload to Artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: ./ani-rss-application/target/ani-rss.jar
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image (temurin)
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/Dockerfile
push: true
tags: |
wushuo894/ani-rss:test
ghcr.io/wushuo894/ani-rss:test
- name: Build and push Docker image (openj9)
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/Dockerfile-openj9
push: true
tags: |
wushuo894/ani-rss:test-openj9
ghcr.io/wushuo894/ani-rss:test-openj9