-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 1.9 KB
/
openshift.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
66
67
68
name: Build Image
on:
push:
branches: ['main', 'dev']
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
# Part 1: Build and push the python scripts image
- name: Extract metadata (tags, labels) for Docker
id: meta-python-scripts
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-python-scripts
- name: Buildah Action - python-scripts
id: build_python-scripts
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}python-scripts
tags: ${{ steps.meta-python-scripts.outputs.tags }}
oci: true
containerfiles: |
./Dockerfile
- name: Push python-scripts Image To GHCR
uses: redhat-actions/push-to-registry@v2
with:
tags: ${{ steps.build_python-scripts.outputs.tags }}
username: ${{ github.actor }}
password: ${{ secrets.ACCESS_TOKEN }}
# Part 2: Build and push the pygeoapi image
- name: Extract metadata (tags, labels) for Docker
id: meta-pygeoapi
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-pygeoapi
- name: Buildah Action - pygeoapi
id: build_pygeoapi
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}-pygeoapi
tags: ${{ steps.meta-pygeoapi.outputs.tags }}
oci: true
containerfiles: |
./pygeoapi/Dockerfile
- name: Push pygeoapi Image To GHCR
uses: redhat-actions/push-to-registry@v2
with:
tags: ${{ steps.build_pygeoapi.outputs.tags }}
username: ${{ github.actor }}
password: ${{ secrets.ACCESS_TOKEN }}