Skip to content

feat: Add license and copyright attribution fallback (DEV-4352) (#3433) #713

feat: Add license and copyright attribution fallback (DEV-4352) (#3433)

feat: Add license and copyright attribution fallback (DEV-4352) (#3433) #713

name: Docker publish Webapi and Sipi images
on:
push:
branches:
- main
jobs:
publish-from-branch:
if: github.event_name != 'release'
name: Publish
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.output_docker_image_tag.outputs.tag }}
steps:
- name: Run preparatory steps
uses: dasch-swiss/dsp-api/.github/actions/preparation@main
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Build and publish dsp-api image to Dockerhub
run: |
echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin
make docker-publish-dsp-api-image
- name: Build and publish sipi images to Dockerhub
run: |
echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin
make docker-publish-sipi-image
- name: Output docker image tag
id: output_docker_image_tag
run: echo "tag=$(make docker-image-tag | tr -d '\n')" >> "$GITHUB_OUTPUT"
shell: bash # Explicit for fail-fast behaviour
trigger-dev-deployment:
name: Trigger deployment to DEV
runs-on: ubuntu-latest
needs: publish-from-branch
steps:
- name: Trigger deployment to DEV
env:
IMAGE_TAG: ${{ needs.publish-from-branch.outputs.tag }}
JENKINS_BASIC_AUTH_USER: ${{ secrets.JENKINS_BASIC_AUTH_USER }}
JENKINS_BASIC_AUTH_PASS: ${{ secrets.JENKINS_BASIC_AUTH_PASS }}
JENKINS_DEV_WEBHOOK: ${{ secrets.JENKINS_DEV_WEBHOOK }}
run: |
curl -f -u "${JENKINS_BASIC_AUTH_USER}:${JENKINS_BASIC_AUTH_PASS}" \
-X POST "${JENKINS_DEV_WEBHOOK}" \
-d "Service=api&Version=${IMAGE_TAG}"