-
Notifications
You must be signed in to change notification settings - Fork 16
37 lines (33 loc) · 1.08 KB
/
image-push-master.yaml
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
name: "push images on merge to master"
on:
push:
branches:
- master
jobs:
build-and-push-ipoib-cni:
name: image push
runs-on: ubuntu-22.04
steps:
- name: Set repository as lower-case output variable
id: repo_name
run: echo ::set-output name=repository::$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
- name: check out the repo
uses: actions/checkout@v3
- name: set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: login to Docker
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and push ipoib-cni
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: linux/amd64,linux/arm64,linux/ppc64le
tags: |
ghcr.io/${{ steps.repo_name.outputs.repository }}
ghcr.io/${{ steps.repo_name.outputs.repository }}:${{ github.sha }}
file: ./Dockerfile