Skip to content

testtag

testtag #35

---
name: docker
on:
push:
branches:
- 'master'
- 'v*'
- 'private/**'
jobs:
buildx:
env:
USERNAME: ${{ secrets.QUAY_USERNAME }}
PASSWORD: ${{ secrets.QUAY_PASSWORD }}
BUILD_ARGS: ""
PLATFORMS: linux/amd64
BRANCH: ${{ github.head_ref || github.ref_name }}
PUSH: true
runs-on: ubuntu-latest
steps:
- name: print quay creds
run:
echo ${{ env.USERNAME }} ${{ env.PASSWORD }}
- name: Output Run NUMBER
run: echo ${{ github.run_number }}
- name: Set env
run:
if startsWith(${{ env.BRANCH }}, 'v')
echo "TAG=$(echo "${{ env.BRANCH }}") >> $GITHUB_ENV
else
echo "TAG=$(echo "${{ env.BRANCH }}" | tr -d /)"-${{ github.run_number }} >> $GITHUB_ENV
fi
- uses: actions/checkout@v3
- name: Setup Docker BuildX
uses: docker/setup-buildx-action@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# setup Docker buld action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to the Quay Registry
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ env.USERNAME }}
password: ${{ env.PASSWORD }}
- name: Build/Push image to Docker Container Registry
uses: docker/build-push-action@v3
with:
context: hostplumber
tags: quay.io/platform9/hostplumber:${{ env.TAG }}
push: ${{ env.PUSH }}
build-args: ${{ env.BUILD_ARGS}}
platforms: ${{ env.PLATFORMS }}