-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (38 loc) · 1 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Main berserker CI
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check code formatting
run: cargo fmt --check
- name: Run clippy
run: cargo clippy
- name: Run tests
run: cargo test
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: make
- name: Get tag
run: |
TAG="$(make tag)"
echo "TAG=$TAG" >> $GITHUB_ENV
- name: Retag and push stackrox-io
uses: stackrox/actions/images/retag-and-push@v1
with:
src-image: berserker
dst-image: quay.io/rhacs-eng/qa:berserker-${{ env.TAG }}
username: ${{ secrets.QUAY_RHACS_ENG_RW_USERNAME }}
password: ${{ secrets.QUAY_RHACS_ENG_RW_PASSWORD }}