Skip to content

Update GHA workflows #33

Update GHA workflows

Update GHA workflows #33

Workflow file for this run

name: push
on:
push:
branches:
- 'master'
tags:
- 'v*'
pull_request:
branches:
- 'master'
jobs:
docker:
if: github.repository_owner == 'keikoproj'
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
# Authenticate to DockerHub first to reduce rate limiting
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
install: true
version: latest
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/cluster-validator
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}