Skip to content

Commit

Permalink
Run everything on all PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
tzununbekov committed Feb 19, 2024
1 parent f95cb60 commit 7e6f53e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Build and Release
# Start build and release process only on E2E completion on master branch
# Big chunk of the release process logic is in the mage build targets
name: Build packages
# Start build process only on E2E completion
# Big chunk of the build process logic is in the mage build targets
on:
workflow_run:
workflows: [E2E tests]
types: [completed]
branches: [master]

# Mage's `GenerateEnvFile` talks to GH API to setup tags, versions, etc.
env:
Expand All @@ -17,8 +16,7 @@ env:
jobs:
build-packages:
if: |
${{ github.event.workflow_run.conclusion == 'success' }} ||
${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
environment: production

Expand Down Expand Up @@ -65,8 +63,7 @@ jobs:
build-swagger:
if: |
${{ github.event.workflow_run.conclusion == 'success' }} ||
${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
environment: production
needs: [build-packages]
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
name: E2E tests
# Run E2E tests after Unit tests (currently, they run on PRs)
# and on "v*" tags push events
on:
workflow_run:
workflows: [Unit tests and linters]
types: [completed]
push:
tags:
- "v*"

jobs:
e2e-tests:
# Parent workflow (unit tests) must succeed or it must be a tag push
# Parent workflow (unit tests) must succeed
if: |
${{ github.event.workflow_run.conclusion == 'success' }} ||
${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
environment: production

Expand Down

0 comments on commit 7e6f53e

Please sign in to comment.