-
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (61 loc) · 1.83 KB
/
base.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
name: Base image
on:
push:
branches: [main]
paths:
- .github/workflows/base.yml
- images/base/**
env:
REGISTRY: ghcr.io
IMAGE_NAME: base
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Setup cosign
uses: sigstore/cosign-installer@v3.3.0
- name: Login to container registry
uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
uses: redhat-actions/buildah-build@v2
id: build
with:
image: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }}
tags: 39 latest
containerfiles: images/base/Containerfile
context: images/base
oci: true
- name: Push image
uses: redhat-actions/push-to-registry@v2
id: push
with:
image: ${{ steps.build.outputs.image }}
tags: ${{ steps.build.outputs.tags }}
registry: ${{ env.REGISTRY }}
- name: Sign image
run: cosign sign -y --recursive --key env://COSIGN_PRIVATE_KEY ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }}@${{ steps.push.outputs.digest }}
env:
COSIGN_EXPERIMENTAL: false
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
node:
needs: build
uses: ./.github/workflows/node.yml
java:
needs: build
uses: ./.github/workflows/java.yml
ansible:
needs: build
uses: ./.github/workflows/ansible.yml
fedora-packager:
needs: build
uses: ./.github/workflows/fedora-packager.yml
rstudio:
needs: build
uses: ./.github/workflows/rstudio.yml