feat: add support for ldap compare request #5
Workflow file for this run
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
--- | |
name: Container - Kanidm | |
# This is always built and uploads an OCI image as a build artifact, but only | |
# pushes to "ghcr.io/kanidm/kanidm:devel" when on "kanidm/kanidm@master". | |
"on": | |
pull_request: | |
push: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
set_lower_case_name: | |
runs-on: ubuntu-latest | |
name: set lower case owner name | |
steps: | |
- id: step1 | |
run: | | |
echo "OWNER_LC=${OWNER,,}" >> "${GITHUB_OUTPUT}" | |
env: | |
OWNER: '${{ github.repository_owner }}' | |
outputs: | |
owner_lc: ${{ steps.step1.outputs.OWNER_LC }} | |
kanidm_build: | |
name: Build kanidm Docker image | |
runs-on: ubuntu-latest | |
needs: set_lower_case_name | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build kanidm | |
uses: docker/build-push-action@v5 | |
with: | |
platforms: "linux/amd64" | |
tags: ghcr.io/${{ needs.set_lower_case_name.outputs.owner_lc }}/kanidm:devel | |
build-args: | | |
"KANIDM_FEATURES=" | |
# "KANIDM_BUILD_OPTIONS=-j1" | |
file: tools/Dockerfile | |
# Must use OCI exporter for multi-arch: https://github.com/docker/buildx/pull/1813 | |
outputs: type=oci,dest=/tmp/kanidm-docker.tar | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: kanidm-docker | |
path: /tmp/kanidm-docker.tar | |
kanidm_push: | |
name: Push kanidm 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: kanidm_build | |
permissions: | |
packages: write | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: kanidm-docker | |
path: /tmp | |
- 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/kanidm-docker.tar:devel" "ghcr.io/${{ github.repository_owner }}/kanidm:devel" |