Skip to content

Commit

Permalink
ci(Gubbins): move gubbins deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Loxeris committed Aug 28, 2024
1 parent 8a0e50b commit 7f0ad47
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 40 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
46 changes: 33 additions & 13 deletions .github/workflows/extension.yml
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -57,4 +49,32 @@ jobs:
uses: cypress-io/github-action@v6
with:
browser: chrome
config: baseUrl=${{ env.DIRACX_URL }}
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

0 comments on commit 7f0ad47

Please sign in to comment.