From 7f0ad47dccb03041aaa87da0abb3e273b5467fae Mon Sep 17 00:00:00 2001 From: Loxeris <30194187+Loxeris@users.noreply.github.com> Date: Wed, 28 Aug 2024 16:13:15 +0200 Subject: [PATCH] ci(Gubbins): move gubbins deployment --- .github/workflows/deployment.yml | 27 ------------------- .github/workflows/extension.yml | 46 +++++++++++++++++++++++--------- 2 files changed, 33 insertions(+), 40 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 55c9771a..69cbf699 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -143,30 +143,3 @@ jobs: push: true tags: ghcr.io/diracgrid/diracx-web/static:${{ needs.release-please.outputs.tag_name }} platforms: linux/amd64,linux/arm64 - - build-deploy-gubbins-image: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'push' && github.repository == 'DIRACGrid/diracx-web' }} - needs: build-deploy-library-package - steps: - - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to GitHub container registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build Docker image (extension example) - uses: docker/build-push-action@v6 - with: - context: ./packages/extensions - push: ${{ github.event_name == 'push' && github.repository == 'DIRACGrid/diracx-web' && github.ref_name == 'main' }} - tags: ghcr.io/diracgrid/diracx-web/static:extension-example - platforms: linux/amd64,linux/arm64 \ No newline at end of file diff --git a/.github/workflows/extension.yml b/.github/workflows/extension.yml index 6f5a197d..0b6abb97 100644 --- a/.github/workflows/extension.yml +++ b/.github/workflows/extension.yml @@ -1,22 +1,14 @@ name: Gubbins extension on: - push: - branches-ignore: - - dependabot/** - - release-please-** - pull_request: - branches-ignore: - - release-please-** + workflow_run: + workflows: [Deployment] + types: completed -defaults: - run: - shell: bash -el {0} - jobs: run-demo: runs-on: ubuntu-latest - if: github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web' + if: github.event.workflow_run.event != 'push' || github.repository == 'DIRACGrid/diracx-web' steps: - uses: actions/checkout@v4 @@ -57,4 +49,32 @@ jobs: uses: cypress-io/github-action@v6 with: browser: chrome - config: baseUrl=${{ env.DIRACX_URL }} \ No newline at end of file + config: baseUrl=${{ env.DIRACX_URL }} + + + build-deploy-gubbins-image: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.event.event_name == 'push' && github.repository == 'DIRACGrid/diracx-web' }} + steps: + - uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Docker image (extension example) + uses: docker/build-push-action@v6 + with: + push: ${{ github.event.workflow_run.event.event_name == 'push' && github.repository == 'DIRACGrid/diracx-web' && github.event.workflow_run.event.ref_name == 'main' }} + context: ./packages/extensions + tags: ghcr.io/diracgrid/diracx-web/static:extension-example + platforms: linux/amd64,linux/arm64 \ No newline at end of file