-
Notifications
You must be signed in to change notification settings - Fork 11
36 lines (34 loc) · 1.07 KB
/
ci-cd.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
name: Container Build
on:
push:
branches:
- master
jobs:
build:
if: github.repository == 'rht-labs/lodestar-git-api'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 13.0.1
- name: SonarCloud Static Analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn verify sonar:sonar -Dsonar.login=${{ secrets.SONAR_TOKEN }} -q
- name: Find and Replace Commit
uses: jacobtomlinson/[email protected]
with:
find: "###GIT_COMMIT###"
replace: "${{ github.sha }}"
include: ".s2i"
- uses: redhat-cop/github-actions/s2i@v2
with:
base: registry.access.redhat.com/ubi8/openjdk-11:1.3
output_image: "quay.io/rht-labs/lodestar-git-api:${{ github.sha }}"
image_push_registry: quay.io
image_push_username: ${{ secrets.QUAY_USERNAME }}
image_push_password: ${{ secrets.QUAY_PASSWORD }}
image_tags: master