chore: debug logs #359
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
| name: Build and push dev images | |
| on: | |
| push: | |
| branches: | |
| - stackable | |
| permissions: | |
| id-token: write | |
| jobs: | |
| docker_backend_dev: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| attestations: write | |
| artifact-metadata: write | |
| id-token: write | |
| outputs: | |
| digest: ${{ steps.build-and-push-backend.outputs.digest }} | |
| steps: | |
| - | |
| name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| with: | |
| persist-credentials: false | |
| - | |
| name: Set up QEMU | |
| uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0 | |
| - | |
| name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0 | |
| - | |
| name: Login to Stackable Harbor | |
| uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0 | |
| with: | |
| registry: oci.stackable.tech | |
| username: robot$stackable+github-action-build | |
| password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }} | |
| - | |
| name: Set up Cosign | |
| uses: sigstore/cosign-installer@9614fae9e5c5eddabb09f90a270fcb487c9f7149 # tag=v3.3.0 | |
| - | |
| name: Set current date as env variable | |
| run: echo "CREATED=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV | |
| - | |
| name: Build and push backend | |
| id: build-and-push-backend | |
| uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 | |
| with: | |
| context: . | |
| file: ./docker/backend/prod/django/Dockerfile | |
| platforms: linux/amd64 | |
| push: true | |
| # Disable buildkit attestations so the pushed reference is the image | |
| # manifest digest (not an index), which actions/attest requires. | |
| provenance: false | |
| tags: oci.stackable.tech/stackable/secobserve-backend:dev | |
| build-args: | | |
| CREATED=${{ env.CREATED }} | |
| REVISION=${{ github.sha }} | |
| VERSION=dev | |
| - | |
| name: Sign the published backend image | |
| run: cosign sign -y oci.stackable.tech/stackable/secobserve-backend@${{ steps.build-and-push-backend.outputs.digest }} | |
| - | |
| name: Attest the published backend image | |
| uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2 | |
| with: | |
| subject-name: oci.stackable.tech/stackable/secobserve-backend | |
| subject-digest: ${{ steps.build-and-push-backend.outputs.digest }} | |
| push-to-registry: true | |
| docker_frontend_dev: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| attestations: write | |
| artifact-metadata: write | |
| id-token: write | |
| outputs: | |
| digest: ${{ steps.build-and-push-frontend.outputs.digest }} | |
| steps: | |
| - | |
| name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| with: | |
| persist-credentials: false | |
| - | |
| name: Set up QEMU | |
| uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0 | |
| - | |
| name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0 | |
| - | |
| name: Login to Stackable Harbor | |
| uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0 | |
| with: | |
| registry: oci.stackable.tech | |
| username: robot$stackable+github-action-build | |
| password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }} | |
| - name: Set up Cosign | |
| uses: sigstore/cosign-installer@9614fae9e5c5eddabb09f90a270fcb487c9f7149 # tag=v3.3.0 | |
| - | |
| name: Set current date as env variable | |
| run: echo "CREATED=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV | |
| - | |
| name: Build and push frontend | |
| id: build-and-push-frontend | |
| uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 | |
| with: | |
| context: . | |
| file: ./docker/frontend/prod/Dockerfile | |
| platforms: linux/amd64 | |
| push: true | |
| # Disable buildkit attestations so the pushed reference is the image | |
| # manifest digest (not an index), which actions/attest requires. | |
| provenance: false | |
| tags: oci.stackable.tech/stackable/secobserve-frontend:dev | |
| build-args: | | |
| CREATED=${{ env.CREATED }} | |
| REVISION=${{ github.sha }} | |
| VERSION=dev | |
| - | |
| name: Sign the published frontend image | |
| run: cosign sign -y oci.stackable.tech/stackable/secobserve-frontend@${{ steps.build-and-push-frontend.outputs.digest }} | |
| - | |
| name: Attest the published frontend image | |
| uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2 | |
| with: | |
| subject-name: oci.stackable.tech/stackable/secobserve-frontend | |
| subject-digest: ${{ steps.build-and-push-frontend.outputs.digest }} | |
| push-to-registry: true |