mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-10 03:13:15 +00:00
Deprecated action `crazy-max/setup-buildx-action@v1` has been replaced with: `docker/setup-qemu-action@v1` `docker/setup-buildx-action@v1` `docker/login-action@v1` `docker/build-push-action@v2` See: https://github.com/crazy-max/ghaction-docker-buildx
57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
name: Release
|
|
env:
|
|
DOCKERHUB_USERNAME: ${{ github.repository_owner }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install tools
|
|
run: |
|
|
curl -L -O https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.2.0/kubebuilder_2.2.0_linux_amd64.tar.gz
|
|
tar zxvf kubebuilder_2.2.0_linux_amd64.tar.gz
|
|
sudo mv kubebuilder_2.2.0_linux_amd64 /usr/local/kubebuilder
|
|
curl -s https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh | bash
|
|
sudo mv kustomize /usr/local/bin
|
|
curl -L -O https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz
|
|
tar zxvf ghr_v0.13.0_linux_amd64.tar.gz
|
|
sudo mv ghr_v0.13.0_linux_amd64/ghr /usr/local/bin
|
|
|
|
- name: Set version
|
|
run: echo "VERSION=$(cat ${GITHUB_EVENT_PATH} | jq -r '.release.tag_name')" >> $GITHUB_ENV
|
|
|
|
- name: Upload artifacts
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: make github-release
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
with:
|
|
version: latest
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
|
|
|
- name: Build and Push
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
file: Dockerfile
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: ${{ env.DOCKERHUB_USERNAME }}/actions-runner-controller:${{ env.VERSION }}
|
|
|