-
Notifications
You must be signed in to change notification settings - Fork 28
40 lines (35 loc) · 1.09 KB
/
docker-image.yml
File metadata and controls
40 lines (35 loc) · 1.09 KB
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
name: Docker Image CI
on:
workflow_dispatch:
inputs:
test_list:
description: Only run tests that match the regular expression
default: ""
required: false
push:
branches: ['main']
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@main
- name: Add krknctl metadata to Dockerfiles
run: |
bash build.sh
- name: Build the Docker images
run: docker compose build --parallel
- name: Login in quay
if: ${{ github.ref == 'refs/heads/main' }}
run: docker login quay.io -u ${QUAY_USER} -p ${QUAY_TOKEN}
env:
QUAY_USER: ${{ secrets.QUAY_USERNAME }}
QUAY_TOKEN: ${{ secrets.QUAY_PASSWORD }}
- name: Push the Docker images
if: ${{ github.ref == 'refs/heads/main' }}
run: docker compose push
- name: Call repo lambda
if: ${{ github.ref == 'refs/heads/main'}}
run: |
curl --location --request POST '${{ secrets.LAMBDA_URL }}' --header 'Authorization: Bearer ${{ secrets.LAMBDA_TOKEN }}'