-
Notifications
You must be signed in to change notification settings - Fork 2
29 lines (28 loc) · 1018 Bytes
/
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
name: "BuildTestDocker"
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
buildtest:
name: "BuildAndTest"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6 # tag=v1
- run: ./build-docker.sh
- run: ./test-docker.sh
- name: "Fail if git detects changes"
run: git add --verbose --all && git diff HEAD --exit-code
- name: Login to DockerHub
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # tag=v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: push to DockerHub
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
run: docker push --all-tags karfau/plantuml