mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-11 03:57:01 +00:00
Adding multi-arch image support for `arm64` and `amd64`. This uses dockers new `buildx` feature, to enable further architectures more work will be required to update the `runner/Dockerfile` file to pull architecture-specific releases. The Makefile targets really should only be used for local testing and not for release, additional work to appropriately tag the release images may need to be added but for now, I've not added that logic. Fixes: #86 Signed-off-by: Michael Fornaro <20387402+xUnholy@users.noreply.github.com>
50 lines
1.7 KiB
YAML
50 lines
1.7 KiB
YAML
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
name: Release
|
|
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 "::set-env name=VERSION::$(cat ${GITHUB_EVENT_PATH} | jq -r '.release.tag_name')"
|
|
|
|
- name: Upload artifacts
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: make github-release
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: crazy-max/ghaction-docker-buildx@v1
|
|
with:
|
|
buildx-version: latest
|
|
|
|
- name: Login to GitHub Docker Registry
|
|
run: echo "${DOCKERHUB_PASSWORD}" | docker login -u "${DOCKERHUB_USERNAME}" --password-stdin
|
|
env:
|
|
DOCKERHUB_USERNAME: summerwind
|
|
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
|
|
|
- name: Build Container Image
|
|
run: |
|
|
docker buildx build \
|
|
--platform linux/amd64,linux/arm64 \
|
|
--tag summerwind/actions-runner-controller:${{ env.VERSION }} \
|
|
-f Dockerfile . --push
|