Skip to content

Merge pull request #15 from kubesphere/revert-14-update-kubectl-Docke… #63

Merge pull request #15 from kubesphere/revert-14-update-kubectl-Docke…

Merge pull request #15 from kubesphere/revert-14-update-kubectl-Docke… #63

Workflow file for this run

name: build
on:
push:
branches:
- 'master'
- 'release-*'
tags:
- 'v*'
jobs:
buildx:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
id: prepare
run: |
VERSION=latest
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
fi
if [ "${{ github.event_name }}" = "schedule" ]; then
VERSION=nightly
fi
echo ::set-output name=version::${VERSION}
- name: Set up docker buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v3
with:
buildx-version: latest
qemu-version: latest
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Docker login
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
- name: Run buildx
run: |
docker buildx build --platform linux/amd64,linux/arm64 --push --file ./Dockerfile -t kubesphere/kubectl:${{ steps.prepare.outputs.version }} .