-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (42 loc) · 1.3 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
37
38
39
40
41
42
43
44
name: Build Container
on:
push:
branches:
- main
jobs:
build:
if: github.repository == 'rht-labs/lodestar-artifacts'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 13.0.1
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: SonarCloud Static Analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B -q verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
- 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-artifacts:${{ github.sha }}"
image_push_registry: quay.io
image_push_username: ${{ secrets.QUAY_USERNAME }}
image_push_password: ${{ secrets.QUAY_PASSWORD }}
image_tags: main