Build ARM64 images
This commit is contained in:
parent
13d66f2ae7
commit
cee1b5b079
5 changed files with 333 additions and 310 deletions
130
.github/workflows/release.yml
vendored
130
.github/workflows/release.yml
vendored
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
name: release
|
||||
|
||||
on:
|
||||
|
@ -6,82 +7,77 @@ on:
|
|||
- published
|
||||
schedule:
|
||||
- cron: '45 5 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
build_cmd:
|
||||
- ./build-latest.sh
|
||||
- PRERELEASE=true ./build-latest.sh
|
||||
- ./build.sh feature
|
||||
- ./build.sh develop
|
||||
- ./build-latest.sh
|
||||
- PRERELEASE=true ./build-latest.sh
|
||||
- ./build.sh feature
|
||||
- ./build.sh develop
|
||||
platform:
|
||||
- linux/amd64,linux/arm64
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
name: Builds new NetBox Docker Images
|
||||
env:
|
||||
GH_ACTION: enable
|
||||
IMAGE_NAMES: docker.io/netboxcommunity/netbox quay.io/netboxcommunity/netbox ghcr.io/netbox-community/netbox
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Get Version of NetBox Docker
|
||||
run: |
|
||||
echo "::set-output name=version::$(cat VERSION)"
|
||||
shell: bash
|
||||
-
|
||||
id: docker-build
|
||||
name: Build the image with '${{ matrix.build_cmd }}'
|
||||
run: ${{ matrix.build_cmd }}
|
||||
-
|
||||
name: Test the image
|
||||
run: IMAGE="${FINAL_DOCKER_TAG}" ./test.sh
|
||||
if: steps.docker-build.outputs.skipped != 'true'
|
||||
|
||||
# docker.io
|
||||
-
|
||||
name: Login to docker.io
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: docker.io
|
||||
username: ${{ secrets.dockerhub_username }}
|
||||
password: ${{ secrets.dockerhub_password }}
|
||||
if: steps.docker-build.outputs.skipped != 'true'
|
||||
-
|
||||
name: Push the image to docker.io
|
||||
run: ${{ matrix.build_cmd }} --push-only
|
||||
if: steps.docker-build.outputs.skipped != 'true'
|
||||
|
||||
# quay.io
|
||||
-
|
||||
name: Login to Quay.io
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: quay.io
|
||||
username: ${{ secrets.quayio_username }}
|
||||
password: ${{ secrets.quayio_password }}
|
||||
if: steps.docker-build.outputs.skipped != 'true'
|
||||
-
|
||||
name: Build and push the image with '${{ matrix.build_cmd }}'
|
||||
run: ${{ matrix.build_cmd }} --push
|
||||
env:
|
||||
DOCKER_REGISTRY: quay.io
|
||||
if: steps.docker-build.outputs.skipped != 'true'
|
||||
|
||||
# ghcr.io
|
||||
-
|
||||
name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
if: steps.docker-build.outputs.skipped != 'true'
|
||||
-
|
||||
name: Build and push the image with '${{ matrix.build_cmd }}'
|
||||
run: ${{ matrix.build_cmd }} --push
|
||||
env:
|
||||
DOCKER_REGISTRY: ghcr.io
|
||||
DOCKER_ORG: netbox-community
|
||||
if: steps.docker-build.outputs.skipped != 'true'
|
||||
- id: source-checkout
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- id: set-netbox-docker-version
|
||||
name: Get Version of NetBox Docker
|
||||
run: echo "::set-output name=version::$(cat VERSION)"
|
||||
shell: bash
|
||||
- id: qemu-setup
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- id: buildx-setup
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- id: docker-build
|
||||
name: Build the image with '${{ matrix.build_cmd }}'
|
||||
run: ${{ matrix.build_cmd }}
|
||||
- id: test-image
|
||||
name: Test the image
|
||||
run: IMAGE="${FINAL_DOCKER_TAG}" ./test.sh
|
||||
if: steps.docker-build.outputs.skipped != 'true'
|
||||
# docker.io
|
||||
- id: docker-io-login
|
||||
name: Login to docker.io
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: docker.io
|
||||
username: ${{ secrets.dockerhub_username }}
|
||||
password: ${{ secrets.dockerhub_password }}
|
||||
if: steps.docker-build.outputs.skipped != 'true'
|
||||
# quay.io
|
||||
- id: quay-io-login
|
||||
name: Login to Quay.io
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: quay.io
|
||||
username: ${{ secrets.quayio_username }}
|
||||
password: ${{ secrets.quayio_password }}
|
||||
if: steps.docker-build.outputs.skipped != 'true'
|
||||
# ghcr.io
|
||||
- id: ghcr-io-login
|
||||
name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
if: steps.docker-build.outputs.skipped != 'true'
|
||||
- id: build-and-push
|
||||
name: Push the image
|
||||
run: ${{ matrix.build_cmd }} --push
|
||||
if: steps.docker-build.outputs.skipped != 'true'
|
||||
env:
|
||||
BUILDX_PLATFORM: ${{ matrix.platform }}
|
||||
BUILDX_BUILDER_NAME: ${{ steps.buildx-setup.outputs.name }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue