Skip to content

Merge pull request #38 from almaslennikov/lowercase-repo-name #2

Merge pull request #38 from almaslennikov/lowercase-repo-name

Merge pull request #38 from almaslennikov/lowercase-repo-name #2

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