forked from wizhaoredhat/ocp-traffic-flow-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 1.66 KB
/
build-and-push.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
name: Build and Push
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set date
id: date
run: echo "::set-output name=date::$(date +'%m-%d-%Y')"
- name: Authenticate
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and Push TFT-x86 image
uses: docker/build-push-action@v2
with:
context: ./images/
file: Containerfile
push: true
tags: |
quay.io/wizhao/tft-tools:${{ steps.date.outputs.date }}-x86_64
- name: Build and Push TFT-ARM64 image
uses: docker/build-push-action@v2
with:
context: ./images/
file: Containerfile
push: true
platforms: linux/arm64
tags: |
quay.io/wizhao/tft-tools:${{ steps.date.outputs.date }}-aarch64
- name: Create and Push Multi-Architecture Manifest
run: |
sudo podman manifest create tft-tools-${{ steps.date.outputs.date }}-list
sudo podman manifest add tft-tools-${{ steps.date.outputs.date }}-list quay.io/wizhao/tft-tools:${{ steps.date.outputs.date }}-x86_64
sudo podman manifest add tft-tools-${{ steps.date.outputs.date }}-list quay.io/wizhao/tft-tools:${{ steps.date.outputs.date }}-aarch64
sudo podman manifest push tft-tools-${{ steps.date.outputs.date }}-list quay.io/wizhao/tft-tools:${{ steps.date.outputs.date }}
sudo podman manifest push tft-tools-${{ steps.date.outputs.date }}-list quay.io/wizhao/tft-tools:latest