-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.42 KB
/
docker-stage-publisher.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
name: Docker stage image publisher
on:
push:
branches:
- stage
jobs:
docker:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Setup opnenjdk-17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Execute Gradle build
run: ./gradlew clean build
- name: Log in to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: samillmu/luffy
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
push: true
build-args: |
DB_URL=${{ secrets.DB_STAGE_URL }}
DB_USERNAME=${{ secrets.DB_STAGE_USERNAME }}
DB_PASSWORD=${{ secrets.DB_STAGE_PASSWORD }}
JWT_SECRET=${{ secrets.JWT_SECRET }}
KAKAO_CLIENT_ID=${{ secrets.KAKAO_CIENT_ID }}
SENTRY_DSN=${{ secrets.SENTRY_DSN }}
tags: |
samillmu/luffy:latest-stage