From 6dcfdf8d39f86a07f9b5cfd2e53cd9a6c22f5bb6 Mon Sep 17 00:00:00 2001 From: Hugh Nimmo-Smith Date: Thu, 6 Feb 2025 12:13:08 +0000 Subject: [PATCH] Cleanup GitHub Actions (#2983) This is mostly just about naming. Plus removing an unused end-to-end testing workflow. --- .github/workflows/build.yaml | 2 +- .github/workflows/e2e.yml | 24 ------------------- .../build-and-publish-docker.yaml} | 2 +- .../build-element-call.yaml} | 2 +- .../deploy-to-netlify.yaml} | 2 +- .github/workflows/pr-deploy.yaml | 6 ++--- .github/workflows/publish.yaml | 6 ++--- 7 files changed, 10 insertions(+), 34 deletions(-) delete mode 100644 .github/workflows/e2e.yml rename .github/workflows/{docker.yaml => lib/build-and-publish-docker.yaml} (98%) rename .github/workflows/{element-call.yaml => lib/build-element-call.yaml} (98%) rename .github/workflows/{netlify.yaml => lib/deploy-to-netlify.yaml} (99%) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dc96a59b..da14c545 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,7 +17,7 @@ on: - "docs/**" jobs: build_element_call: - uses: ./.github/workflows/element-call.yaml + uses: ./.github/workflows/lib/build-element-call.yaml with: vite_app_version: ${{ github.event.release.tag_name || github.sha }} secrets: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml deleted file mode 100644 index ff347636..00000000 --- a/.github/workflows/e2e.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Run E2E tests -on: - workflow_run: - workflows: ["deploy"] - types: - - completed - branches-ignore: - - "livekit" -jobs: - e2e: - name: E2E tests runs on Element Call - runs-on: ubuntu-latest - steps: - - name: Check out test private repo - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - with: - repository: element-hq/static-call-participant - ref: refs/heads/main - path: static-call-participant - token: ${{ secrets.GH_E2E_TEST_TOKEN }} - - name: Build E2E Image - run: "cd static-call-participant && docker build --no-cache --tag matrixdotorg/chrome-node-static-call-participant:latest ." - - name: Run E2E tests in container - run: "docker run --rm -v '${{ github.workspace }}/static-call-participant/callemshost-users.txt:/opt/app/callemshost-users.txt' matrixdotorg/chrome-node-static-call-participant:latest ./e2e.sh" diff --git a/.github/workflows/docker.yaml b/.github/workflows/lib/build-and-publish-docker.yaml similarity index 98% rename from .github/workflows/docker.yaml rename to .github/workflows/lib/build-and-publish-docker.yaml index f0f52291..54181256 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/lib/build-and-publish-docker.yaml @@ -1,4 +1,4 @@ -name: Docker - Deploy +name: Build and publish docker image on: workflow_call: inputs: diff --git a/.github/workflows/element-call.yaml b/.github/workflows/lib/build-element-call.yaml similarity index 98% rename from .github/workflows/element-call.yaml rename to .github/workflows/lib/build-element-call.yaml index 8db88b14..f4868900 100644 --- a/.github/workflows/element-call.yaml +++ b/.github/workflows/lib/build-element-call.yaml @@ -1,4 +1,4 @@ -name: Element Call - Build +name: Build Element Call on: workflow_call: inputs: diff --git a/.github/workflows/netlify.yaml b/.github/workflows/lib/deploy-to-netlify.yaml similarity index 99% rename from .github/workflows/netlify.yaml rename to .github/workflows/lib/deploy-to-netlify.yaml index 9c7b7d09..f643e9e0 100644 --- a/.github/workflows/netlify.yaml +++ b/.github/workflows/lib/deploy-to-netlify.yaml @@ -1,4 +1,4 @@ -name: Netlify - Deploy +name: Deploy to Netlify on: workflow_call: inputs: diff --git a/.github/workflows/pr-deploy.yaml b/.github/workflows/pr-deploy.yaml index 262ce09b..3573cd6a 100644 --- a/.github/workflows/pr-deploy.yaml +++ b/.github/workflows/pr-deploy.yaml @@ -1,4 +1,4 @@ -name: PR Preview Deployments +name: Deploy previews for PRs on: workflow_run: workflows: ["Build"] @@ -24,7 +24,7 @@ jobs: needs: prdetails permissions: deployments: write - uses: ./.github/workflows/netlify.yaml + uses: ./.github/workflows/lib/deploy-to-netlify.yaml with: artifact_run_id: ${{ github.event.workflow_run.id || github.run_id }} pr_number: ${{ needs.prdetails.outputs.pr_number }} @@ -42,7 +42,7 @@ jobs: permissions: contents: write packages: write - uses: ./.github/workflows/docker.yaml + uses: ./.github/workflows/lib/build-and-publish-docker.yaml with: artifact_run_id: ${{ github.event.workflow_run.id || github.run_id }} docker_tags: | diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index e6a0597a..556b1406 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,4 +1,4 @@ -name: Build & publish images to the package registry for tags +name: Build & publish images to the package registry for releases on: release: @@ -16,7 +16,7 @@ env: jobs: build_element_call: if: ${{ github.event_name == 'release' }} - uses: ./.github/workflows/element-call.yaml + uses: ./.github/workflows/lib/build-element-call.yaml with: vite_app_version: ${{ github.event.release.tag_name || github.sha }} secrets: @@ -62,7 +62,7 @@ jobs: permissions: contents: write packages: write - uses: ./.github/workflows/docker.yaml + uses: ./.github/workflows/lib/build-and-publish-docker.yaml with: artifact_run_id: ${{ github.event.workflow_run.id || github.run_id }} docker_tags: |