Skip to content

Publish Docker images also to ACR #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 23, 2025
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Docker Build & Push & Test
name: CD

on:
push:
branches:
- main
pull_request:
branches: [main]

jobs:
push_to_registry:
publish_docker_image_to_docker_hub:
name: Build & Push docker image to dockerhub
# The MS SQL server version in use does not run on Linux kernels newer than 6.6.x.
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -61,9 +62,22 @@ jobs:
docker push $IMAGE_NAME:schema-only
docker push $IMAGE_NAME:latest

publish_docker_image_to_acr:
name: Publish Docker image to ACR
permissions:
id-token: write
contents: read
uses: HSLdevcom/jore4-tools/.github/workflows/shared-build-and-publish-docker-image.yml@shared-build-and-publish-docker-image-v1
with:
docker_image_name: jore4-mssql-testdb
secrets:
azure_client_id: ${{ secrets.AZURE_CLIENT_ID }}
azure_tenant_id: ${{ secrets.AZURE_TENANT_ID }}
azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

test-docker-images:
name: verify that the docker images work
needs: push_to_registry
needs: publish_docker_image_to_docker_hub
# The MS SQL server version in use does not run on Linux kernels newer than 6.6.x.
runs-on: ubuntu-22.04
env:
Expand Down Expand Up @@ -157,7 +171,7 @@ jobs:
diff --ignore-all-space --ignore-blank-lines dbresults.txt expectedresults.txt

run_e2e_tests:
needs: push_to_registry
needs: publish_docker_image_to_docker_hub
name: Run E2E tests
# The MS SQL server version in use does not run on Linux kernels newer than 6.6.x.
runs-on: ubuntu-22.04
Expand Down
Loading