forked from parodos-dev/parodos
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.29 KB
/
push.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
---
name: Main push
on:
push:
branches:
- main
- parodos-dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha != '' && github.event.pull_request.head.sha || github.sha }}
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Maven Verify
run: mvn clean verify
- name: Check generated files are up to date
run: |
if [[ $(git ls-files --others --exclude-standard) ]]; then echo "These files are not tracked by git"; git ls-files --others --exclude-standard; exit 1; fi
if [ -n "$(git status --porcelain)" ]; then echo "There are uncommitted changes:"; git status --short; exit 1; fi
- name: "Build container images"
run: |
make build-images GIT_BRANCH=${GITHUB_REF##*/}
make tag-images GIT_BRANCH=${GITHUB_REF##*/}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: "quay.io"
username: "parodos-dev+githubpush"
password: "${{ secrets.QUAY_GITHUB_TOKEN }}"
- name: "Build container images"
run: |
make push-images GIT_BRANCH=${GITHUB_REF##*/}