-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (71 loc) · 2.43 KB
/
github-actions.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
69
70
71
72
73
74
75
76
77
78
79
80
name: Build and push development image
on:
push:
paths:
- "**.Containerfile"
schedule:
# At 5:15 on a Sunday
- cron: "15 5 * * 0"
workflow_dispatch:
jobs:
build:
name: Build development images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@v1
with:
format: "YYYY-MM-DD"
- name: Build base image
id: build-base-image
uses: redhat-actions/buildah-build@v2
with:
image: base
tags: latest ${{ steps.date.outputs.time }}-${{ github.sha }}
containerfiles: |
./images/base.Containerfile
- name: Push base to Docker
id: push-base-to-docker
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-base-image.outputs.image }}
tags: ${{ steps.build-base-image.outputs.tags }}
registry: docker.io/${{ github.actor }}
username: ${{ github.actor }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build admin image
id: build-admin-image
uses: redhat-actions/buildah-build@v2
with:
image: admin
tags: latest ${{ steps.date.outputs.time }}-${{ github.sha }}
containerfiles: |
./images/admin.Containerfile
- name: Push admin to Docker
id: push-admin-to-docker
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-admin-image.outputs.image }}
tags: ${{ steps.build-admin-image.outputs.tags }}
registry: docker.io/${{ github.actor }}
username: ${{ github.actor }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build work image
id: build-work-image
uses: redhat-actions/buildah-build@v2
with:
image: work
tags: latest ${{ steps.date.outputs.time }}-${{ github.sha }}
containerfiles: |
./images/work.Containerfile
- name: Push work to Docker
id: push-work-to-docker
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-work-image.outputs.image }}
tags: ${{ steps.build-work-image.outputs.tags }}
registry: docker.io/${{ github.actor }}
username: ${{ github.actor }}
password: ${{ secrets.REGISTRY_PASSWORD }}