From 0dbb256e9fc17aab6741902b29ad80a020ae92b1 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Mon, 25 Nov 2024 19:05:49 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7(summary)=20build=20and=20push=20su?= =?UTF-8?q?mmary=20image?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copy pasted from the job in charge of building and pushing the backend image. --- .github/workflows/docker-hub.yml | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index cd743a6f..03a0cca2 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -117,10 +117,57 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + build-and-push-summary: + runs-on: ubuntu-latest + steps: + - + uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + repositories: "meet,secrets" + - + name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + token: ${{ steps.app-token.outputs.token }} + - + name: Load sops secrets + uses: rouja/actions-sops@main + with: + secret-file: secrets/numerique-gouv/meet/secrets.enc.env + age-key: ${{ secrets.SOPS_PRIVATE }} + - + name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: lasuite/meet-summary + - + name: Login to DockerHub + if: github.event_name != 'pull_request' + run: echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USER" --password-stdin + - + name: Build and push + uses: docker/build-push-action@v6 + with: + context: ./src/summary + file: ./src/summary/Dockerfile + target: production + build-args: DOCKER_USER=${{ env.DOCKER_USER }}:-1000 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + notify-argocd: needs: - build-and-push-frontend - build-and-push-backend + - build-and-push-summary runs-on: ubuntu-latest if: | github.event_name != 'pull_request'