forked from FreeRADIUS/freeradius-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: add workflow to build multi-arch images for dockerhub
- Loading branch information
Showing
1 changed file
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: Dockerhub Dev | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- coverity_scan | ||
workflow_dispatch: | ||
|
||
env: | ||
CI: 1 | ||
GH_ACTIONS: 1 | ||
DEBIAN_FRONTEND: noninteractive | ||
APT_OPTS: "-y --no-install-recommends" | ||
DOCKER_REGISTRY: docker.io | ||
DOCKER_REPOSITORY: freeradius-dev-3.2.x | ||
|
||
jobs: | ||
# | ||
# Run docker target for each given OS and ARCH. This will | ||
# build the Docker images. | ||
# | ||
docker: | ||
runs-on: ubuntu-22.04 | ||
|
||
strategy: | ||
matrix: | ||
env: | ||
- { OS: "ubuntu", ARCH: "linux/amd64" } | ||
- { OS: "ubuntu", ARCH: "linux/arm/v7" } | ||
- { OS: "ubuntu", ARCH: "linux/arm64/v8" } | ||
- { OS: "alpine", ARCH: "linux/amd64" } | ||
- { OS: "alpine", ARCH: "linux/arm/v6" } | ||
- { OS: "alpine", ARCH: "linux/arm/v7" } | ||
- { OS: "alpine", ARCH: "linux/arm64/v8" } | ||
|
||
fail-fast: false | ||
|
||
name: "${{ matrix.env.OS }}-${{ matrix.env.ARCH }}" | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Regenerate Dockerfiles | ||
run: | | ||
rm scripts/docker/dists/*/Dockerfile || true | ||
make docker.regen | ||
- name: Install qemu | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install ${APT_OPTS} qemu-user-static | ||
- name: Build docker image | ||
run: | | ||
make docker-${{ matrix.env.OS }} DOCKER_TAG="$DOCKER_REPOSITORY" DOCKER_BUILD_ARGS="--no-cache --platform ${{ matrix.env.ARCH }}" | ||
make docker-tag-latest-${{ matrix.env.OS }} DOCKER_TAG="$DOCKER_REPOSITORY" DOCKER_BUILD_ARGS="--no-cache --platform ${{ matrix.env.ARCH }}" | ||
- name: Docker system info | ||
run: | | ||
docker system info || true | ||
- name: Docker images | ||
run: | | ||
docker image ls -a || true | ||
- name: Docker inspect | ||
run: | | ||
docker inspect freeradius/freeradius-dev:latest || true | ||
docker inspect freeradius/freeradius-dev:latest-alpine || true | ||
# - name: Docker login | ||
# uses: docker/login-action@v2 | ||
# with: | ||
# username: ${{ secrets.DOCKER_REPO_UPDATE_USERNAME }} | ||
# password: ${{ secrets.DOCKER_REPO_UPDATE_PASSWORD }} | ||
# registry: ${{ env.DOCKER_REGISTRY }} | ||
# | ||
# - name: Push images to Docker registry | ||
# shell: bash | ||
# run: | | ||
# make docker-push-latest-${{ matrix.env.OS }} | ||
|
||
# | ||
# If the CI has failed and the branch is ci-debug then start a tmate | ||
# session. SSH rendezvous point is emited continuously in the job output. | ||
# | ||
- name: "Debug: Start tmate" | ||
uses: mxschmitt/action-tmate@v3 | ||
with: | ||
limit-access-to-actor: true | ||
if: ${{ github.ref == 'refs/heads/ci-debug' && failure() }} |