-
-
Notifications
You must be signed in to change notification settings - Fork 4
35 lines (29 loc) · 990 Bytes
/
java_springboot_webapi.yml
File metadata and controls
35 lines (29 loc) · 990 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
35
name: java_springboot_webapi
on:
push:
branches: [main]
paths:
- ".github/workflows/java_springboot_webapi.yml"
- "src/services/jvm/java/springboot/webapi/**"
env:
DOCKER_USERNAME: ${{ github.actor }}
DOCKER_PASSWORD_FILE_PATH: ./GITHUB_TOKEN
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: build
working-directory: ./src/services/jvm/java/springboot/webapi/
# write the github actions secret to a file
# the file allows us to use `docker login --password-stdin`
# while it would be possible to:
# `echo ${DOCKER_PASSWORD} | docker login --password-stdin`
# using a file encourages console logging and history best practices
run: |
printf "${{ secrets.GH_TOKEN_PACKAGES }}" >> ${DOCKER_PASSWORD_FILE_PATH}
make deploy
- name: cleanup
if: ${{ always() }}
run: |
rm -f "${DOCKER_PASSWORD_FILE_PATH}"