fix(deps): vuln minor upgrades — 12 packages (minor: 5 · patch: 7) [print-service/infra] #85
This file contains hidden or 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
| # Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. | |
| # This product includes software developed at Datadog (https://www.datadoghq.com/). | |
| # Copyright 2025-Present Datadog, Inc. | |
| name: Print Service | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| paths: | |
| - "print-service/**" | |
| - ".github/**" | |
| workflow_dispatch: | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME_PRINT_SERVICE: ${{ github.repository_owner }}/stickerlandia/print-service | |
| IMAGE_NAME_PRINT_WORKER: ${{ github.repository_owner }}/stickerlandia/print-service-worker | |
| IMAGE_NAME_PRINT_MIGRATION: ${{ github.repository_owner }}/stickerlandia/print-service-migration | |
| IMAGE_NAME_PRINT_CLIENT: ${{ github.repository_owner }}/stickerlandia/print-service-client | |
| REPOSITORY_URL: github.com/${{ github.repository }} | |
| jobs: | |
| unit-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 #4.3.1 | |
| with: | |
| dotnet-version: "10.0.x" | |
| - name: Format Code | |
| shell: bash | |
| run: | | |
| cd print-service | |
| dotnet format | |
| - name: Run Unit Tests | |
| shell: bash | |
| run: | | |
| cd print-service/tests/Stickerlandia.PrintService.UnitTest | |
| dotnet test | |
| integration-test-aws: | |
| runs-on: ubuntu-latest | |
| needs: unit-test | |
| strategy: | |
| matrix: | |
| DRIVING: | |
| - AWS | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 #4.3.1 | |
| with: | |
| dotnet-version: "10.0.x" | |
| - name: .NET Restore | |
| shell: bash | |
| run: | | |
| cd print-service | |
| dotnet restore Stickerlandia.PrintService.sln | |
| - name: Run Integration Tests | |
| shell: bash | |
| env: | |
| DRIVING: ${{ matrix.DRIVING }} | |
| DRIVEN: AWS | |
| run: | | |
| cd print-service/tests/Stickerlandia.PrintService.IntegrationTest && dotnet test --logger:"console;verbosity=detailed" | |
| integration-test-agnostic: | |
| runs-on: ubuntu-latest | |
| needs: unit-test | |
| strategy: | |
| matrix: | |
| DRIVING: | |
| - AGNOSTIC | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 #4.3.1 | |
| with: | |
| dotnet-version: "10.0.x" | |
| - name: .NET Restore | |
| shell: bash | |
| run: | | |
| cd print-service | |
| dotnet restore Stickerlandia.PrintService.sln | |
| - name: Run Integration Tests | |
| shell: bash | |
| env: | |
| DRIVING: ${{ matrix.DRIVING }} | |
| DRIVEN: AGNOSTIC | |
| run: | | |
| cd print-service/tests/Stickerlandia.PrintService.IntegrationTest && dotnet test --logger:"console;verbosity=detailed" | |
| push-image: | |
| runs-on: ubuntu-latest | |
| needs: [ | |
| integration-test-aws, | |
| integration-test-agnostic | |
| ] | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| permissions: | |
| contents: read | |
| packages: write | |
| attestations: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Get Commit Info | |
| id: get_sha | |
| run: | | |
| echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
| echo "COMMIT_SHA_FULL=$(git rev-parse HEAD)" >> $GITHUB_ENV | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_PRINT_SERVICE }} | |
| tags: | | |
| latest | |
| ${{ env.COMMIT_SHA }} | |
| - name: Build and push Docker image | |
| id: push | |
| uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | |
| with: | |
| context: ./print-service | |
| file: ./print-service/src/Stickerlandia.PrintService.Api/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| GIT_COMMIT_SHA=${{ env.COMMIT_SHA_FULL }} | |
| DD_GIT_COMMIT_SHA=${{ env.COMMIT_SHA_FULL }} | |
| GIT_REPOSITORY_URL=${{ env.REPOSITORY_URL }} | |
| DD_GIT_REPOSITORY_URL=${{ env.REPOSITORY_URL }} | |
| push-worker-service: | |
| runs-on: ubuntu-latest | |
| needs: [ | |
| integration-test-aws, | |
| integration-test-agnostic | |
| ] | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| permissions: | |
| contents: read | |
| packages: write | |
| attestations: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Get Commit Info | |
| id: get_sha | |
| run: | | |
| echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_PRINT_WORKER }} | |
| tags: | | |
| latest | |
| ${{ env.COMMIT_SHA }} | |
| - name: Build and push Docker image | |
| id: push | |
| uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | |
| with: | |
| context: ./print-service | |
| file: ./print-service/src/Stickerlandia.PrintService.Worker/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| GIT_COMMIT_SHA=${{ env.COMMIT_SHA }} | |
| GIT_REPOSITORY_URL=${{ env.REPOSITORY_URL }} | |
| DD_GIT_REPOSITORY_URL=${{ env.REPOSITORY_URL }} | |
| DD_GIT_COMMIT_SHA=${{ env.COMMIT_SHA }} | |
| push-migration-service: | |
| runs-on: ubuntu-latest | |
| needs: [ | |
| integration-test-aws, | |
| integration-test-agnostic | |
| ] | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| permissions: | |
| contents: read | |
| packages: write | |
| attestations: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Get Commit Info | |
| id: get_sha | |
| run: | | |
| echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_PRINT_MIGRATION }} | |
| tags: | | |
| latest | |
| ${{ env.COMMIT_SHA }} | |
| - name: Build and push Docker image | |
| id: push | |
| uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | |
| with: | |
| context: ./print-service | |
| file: ./print-service/src/Stickerlandia.PrintService.MigrationService/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| GIT_COMMIT_SHA=${{ env.COMMIT_SHA }} | |
| GIT_REPOSITORY_URL=${{ env.REPOSITORY_URL }} | |
| DD_GIT_REPOSITORY_URL=${{ env.REPOSITORY_URL }} | |
| DD_GIT_COMMIT_SHA=${{ env.COMMIT_SHA }} | |
| push-print-client-image: | |
| runs-on: ubuntu-latest | |
| needs: [ | |
| integration-test-aws, | |
| integration-test-agnostic | |
| ] | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| permissions: | |
| contents: read | |
| packages: write | |
| attestations: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Get Commit Info | |
| id: get_sha | |
| run: | | |
| echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_PRINT_CLIENT }} | |
| tags: | | |
| latest | |
| ${{ env.COMMIT_SHA }} | |
| - name: Build and push Docker image | |
| id: push | |
| uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | |
| with: | |
| context: ./print-service | |
| file: ./print-service/src/Stickerlandia.PrintService.Client/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| GIT_COMMIT_SHA=${{ env.COMMIT_SHA }} | |
| GIT_REPOSITORY_URL=${{ env.REPOSITORY_URL }} | |
| DD_GIT_REPOSITORY_URL=${{ env.REPOSITORY_URL }} | |
| DD_GIT_COMMIT_SHA=${{ env.COMMIT_SHA }} | |
| deploy-aws-dev: | |
| runs-on: ubuntu-latest | |
| needs: [push-image, push-worker-service, push-migration-service, push-print-client-image] | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| permissions: | |
| contents: read | |
| packages: write | |
| attestations: write | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Set up Node | |
| uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1 | |
| with: | |
| node-version: "20" | |
| - name: Install CDK | |
| run: | | |
| npm install -g aws-cdk | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| cd shared/lib/shared-constructs | |
| npm i | |
| - uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1 | |
| with: | |
| dotnet-version: "10.0.x" | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df | |
| with: | |
| role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
| role-session-name: GitHub_to_AWS_via_FederatedOIDC | |
| aws-region: "eu-west-1" | |
| - name: Set Commit Hash Environment Variables | |
| shell: bash | |
| run: | | |
| echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | |
| - name: Deploy to dev AWS | |
| shell: bash | |
| env: | |
| VERSION: ${{ env.sha_short }} | |
| ENV: "dev" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: "datadoghq.com" | |
| run: | | |
| cd print-service/infra/aws | |
| npm i | |
| cdk deploy --require-approval never |