-
Notifications
You must be signed in to change notification settings - Fork 22
33 lines (33 loc) · 940 Bytes
/
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
name: "Push Images"
on:
workflow_dispatch:
push:
branches:
- sb-2.7.x
jobs:
push:
name: Push Images to Quay.io
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11 ]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Java
uses: actions/[email protected]
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
cache: 'maven'
- name: Quay.io Login
run: docker login quay.io -u="${{secrets.QUAY_USER}}" -p="${{secrets.QUAY_TOKEN}}"
- name: Build
run: ./mvnw -s .github/mvn-settings.xml clean package
- name: Push Image to Quay.io
run: |
CONTAINER_REGISTRY=quay.io/snowdrop
IMAGE=spring-boot-crud-example:2.7
docker build . -t $IMAGE
docker tag $IMAGE $CONTAINER_REGISTRY/$IMAGE
docker push $CONTAINER_REGISTRY/$IMAGE