-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (56 loc) · 1.79 KB
/
resultsdb_frontend.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
name: ResultsDB_Frontend
"on":
pull_request:
push:
workflow_dispatch:
inputs: {}
jobs:
hadolint:
name: Hadolint
runs-on: ubuntu-latest
strategy:
matrix:
dockerfile:
- Dockerfile
steps:
- uses: actions/checkout@v4
- uses: hadolint/[email protected]
with:
dockerfile: ${{ matrix.dockerfile }}
failure-threshold: warning
image-build:
name: Container Image Build
needs: hadolint
runs-on: ubuntu-latest
env:
IMAGE_NAME: resultsdb_frontend
REGISTRY: quay.io/factory2
GH_REGISTRY: ghcr.io/${{ github.actor }}
steps:
- uses: actions/checkout@v4
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: >-
${{ github.ref == 'refs/heads/develop' && 'latest' || '' }}
${{ github.sha }}
containerfiles: Dockerfile
build-args: |
GITHUB_SHA=${{ github.sha }}
- name: Log in to the image registry
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
uses: redhat-actions/podman-login@v1
with:
registry: ${{ secrets.REGISTRY_USER && env.REGISTRY || env.GH_REGISTRY }}
username: ${{ secrets.REGISTRY_USER || github.actor }}
password: ${{ secrets.REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
- name: Push Image
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ secrets.REGISTRY_USER && env.REGISTRY || env.GH_REGISTRY }}