Merge pull request #1498 from fleeto/build-docker-image
build and push image to docker hub in a a separate action
This commit is contained in:
commit
facae5582b
|
@ -0,0 +1,45 @@
|
|||
name: released image to dockerhub
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
jobs:
|
||||
publish-image-to-dockerhub::
|
||||
name: publish to DockerHub
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- karmada-controller-manager
|
||||
- karmada-scheduler
|
||||
- karmada-descheduler
|
||||
- karmada-webhook
|
||||
- karmada-agent
|
||||
- karmada-scheduler-estimator
|
||||
- karmada-interpreter-webhook-example
|
||||
- karmada-aggregated-apiserver
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# fetch-depth:
|
||||
# 0 indicates all history for all branches and tags.
|
||||
# for `git describe --tags` in Makefile.
|
||||
fetch-depth: 0
|
||||
- name: install Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.17.x
|
||||
- name: install QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: install Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USER_NAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: build and publish images
|
||||
env:
|
||||
VERSION: ${{ github.ref_name }}
|
||||
run: make mp-image-${{ matrix.target }}
|
Loading…
Reference in New Issue