forked from Together-Java/TJ-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (31 loc) · 939 Bytes
/
docker-publish.yaml
File metadata and controls
34 lines (31 loc) · 939 Bytes
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
name: Docker Publish
on:
push:
branches:
- 'develop'
- 'master'
env:
JAVA_VERSION: 17
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build and Publish Docker Image
env:
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }}
run: ./gradlew jib
- name: Re-Deploy
run: "curl -H 'Authorization: Bearer ${{ secrets.WATCHTOWER_TOKEN }}' https://togetherjava.duckdns.org:5003/v1/update"