-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (43 loc) · 1.72 KB
/
main.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
name: Docker Image Build - Push GHCR
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
packages: write
pull-requests: read
repository-projects: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set release date
run: |
echo "TAG=$(date +%s)" >> ${GITHUB_ENV}
- name: Docker login 2
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the base UBI Docker image
run: docker build . --file Dockerfile --target base --tag ghcr.io/nearnodeflash/rhel-ubi8-base:${TAG}
- name: Build the UBI Docker image with lustre
run: docker build . --file Dockerfile --tag ghcr.io/nearnodeflash/rhel-ubi8-lustre:${TAG}
- name: List docker images
run: docker images
- name: Tag the base UBI image as latest
run: docker tag ghcr.io/nearnodeflash/rhel-ubi8-base:${TAG} ghcr.io/nearnodeflash/rhel-ubi8-base:latest
- name: Push the base UBI image
run: docker push ghcr.io/nearnodeflash/rhel-ubi8-base:${TAG}
- name: Push the latest base UBI image
run: docker push ghcr.io/nearnodeflash/rhel-ubi8-base:latest
- name: Tag the lustre UBI image as latest
run: docker tag ghcr.io/nearnodeflash/rhel-ubi8-lustre:${TAG} ghcr.io/nearnodeflash/rhel-ubi8-lustre:latest
- name: Push the lustre UBI image
run: docker push ghcr.io/nearnodeflash/rhel-ubi8-lustre:${TAG}
- name: Push the latest lustre UBI image
run: docker push ghcr.io/nearnodeflash/rhel-ubi8-lustre:latest