mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 20:47:01 +01:00
Bumps the all group with 2 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact) and [actions/download-artifact](https://github.com/actions/download-artifact). Updates `actions/upload-artifact` from 3 to 4 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) Updates `actions/download-artifact` from 3 to 4 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: all - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: all ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
61 lines
2 KiB
YAML
61 lines
2 KiB
YAML
---
|
|
name: Container - Radiusd
|
|
|
|
# This is always built and uploads an OCI image as a build artifact, but only
|
|
# pushes to "ghcr.io/kanidm/radius:devel" when on "kanidm/kanidm@master".
|
|
"on":
|
|
pull_request:
|
|
push:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
radius_build:
|
|
name: Build radius Docker image
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Build radius
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
platforms: linux/arm64,linux/amd64
|
|
tags: ghcr.io/${{ github.repository_owner }}/radius:devel
|
|
file: rlm_python/Dockerfile
|
|
# Must use OCI exporter for multi-arch: https://github.com/docker/buildx/pull/1813
|
|
outputs: type=oci,dest=/tmp/radius-docker.tar
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: radius-docker
|
|
path: /tmp/radius-docker.tar
|
|
|
|
radius_push:
|
|
name: Push radius Docker image
|
|
# This step is split so that we don't apply "packages: write" permission
|
|
# except when uploading the final Docker image to GHCR.
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/master' && github.repository == 'kanidm/kanidm'
|
|
needs: radius_build
|
|
permissions:
|
|
packages: write
|
|
|
|
steps:
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: radius-docker
|
|
path: /tmp
|
|
|
|
# Docker won't directly import OCI images and keep their multi-arch
|
|
# features, but ORAS will: https://oras.land/docs/commands/oras_copy
|
|
- name: Push image to GHCR
|
|
run: |
|
|
echo "${{ secrets.GITHUB_TOKEN }}" | oras login -u "${{ github.actor }}" --password-stdin ghcr.io
|
|
oras copy --from-oci-layout "/tmp/radius-docker.tar:devel" "ghcr.io/${{ github.repository_owner }}/radius:devel"
|