Update mkrequest to use 2048-bit key #6
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: Publish SSCEP | |
on: [push, pull_request] | |
env: | |
NAMESPACE: ${{ vars.REGISTRY_NAMESPACE || github.repository_owner }} | |
jobs: | |
init: | |
name: Initialization | |
runs-on: ubuntu-latest | |
steps: | |
- name: Container registry configuration | |
run: | | |
echo "REGISTRY: ${{ vars.REGISTRY }}" | |
echo "REGISTRY_NAMESPACE: ${{ vars.REGISTRY_NAMESPACE }}" | |
build: | |
name: Building SSCEP | |
needs: init | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build sscep-builder image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
tags: sscep-builder | |
target: sscep-builder | |
- name: Build sscep-dist image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
tags: sscep-dist | |
target: sscep-dist | |
outputs: type=docker,dest=sscep-dist.tar | |
- name: Store sscep-dist image | |
uses: actions/cache@v4 | |
with: | |
key: sscep-dist-${{ github.sha }} | |
path: sscep-dist.tar | |
- name: Build sscep image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
tags: sscep | |
target: sscep | |
outputs: type=docker,dest=sscep.tar | |
- name: Store sscep image | |
uses: actions/cache@v4 | |
with: | |
key: sscep-${{ github.sha }} | |
path: sscep.tar | |
publish: | |
name: Publishing SSCEP | |
if: github.event_name == 'push' && github.ref_name == 'v0.10.0-pki' && vars.REGISTRY != '' | |
needs: [init, build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ vars.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
if: vars.REGISTRY == 'ghcr.io' | |
- name: Log in to other container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ vars.REGISTRY }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
if: vars.REGISTRY != 'ghcr.io' | |
- name: Retrieve sscep-dist image | |
uses: actions/cache@v4 | |
with: | |
key: sscep-dist-${{ github.sha }} | |
path: sscep-dist.tar | |
- name: Publish sscep-dist image | |
run: | | |
docker load --input sscep-dist.tar | |
docker tag sscep-dist ${{ vars.REGISTRY }}/$NAMESPACE/sscep-dist:latest | |
docker push ${{ vars.REGISTRY }}/$NAMESPACE/sscep-dist:latest | |
- name: Retrieve sscep image | |
uses: actions/cache@v4 | |
with: | |
key: sscep-${{ github.sha }} | |
path: sscep.tar | |
- name: Publish sscep image | |
run: | | |
docker load --input sscep.tar | |
docker tag sscep ${{ vars.REGISTRY }}/$NAMESPACE/sscep:latest | |
docker push ${{ vars.REGISTRY }}/$NAMESPACE/sscep:latest |