mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Updated test workflow to reflect branch renames
no issue - 4.x has been renamed to main, which is now the default - `master` is now 3.x, which is on a different set of workflows anyway
This commit is contained in:
parent
bf163bf058
commit
a2d97de09a
1 changed files with 6 additions and 34 deletions
40
.github/workflows/test.yml
vendored
40
.github/workflows/test.yml
vendored
|
@ -3,9 +3,8 @@ on:
|
|||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '4.0'
|
||||
- 3.*
|
||||
- main
|
||||
- 3.x
|
||||
- 2.x
|
||||
- 'renovate/*'
|
||||
env:
|
||||
|
@ -23,7 +22,7 @@ jobs:
|
|||
- run: yarn
|
||||
- run: yarn lint
|
||||
- uses: daniellockyer/action-slack-build@master
|
||||
if: failure() && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/4.0')
|
||||
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
with:
|
||||
status: ${{ job.status }}
|
||||
env:
|
||||
|
@ -68,11 +67,6 @@ jobs:
|
|||
sleep 20 && { kill $! && wait $!; } 2>/dev/null
|
||||
|
||||
- run: yarn knex-migrator rollback --v 4.0 --force
|
||||
if: github.ref == 'refs/heads/4.0'
|
||||
|
||||
- run: yarn knex-migrator rollback --v 3.0 --force
|
||||
if: github.ref == 'refs/heads/master'
|
||||
|
||||
- run: yarn knex-migrator migrate --force
|
||||
|
||||
test:
|
||||
|
@ -114,7 +108,7 @@ jobs:
|
|||
- run: grunt test-regression --verbose
|
||||
|
||||
- uses: daniellockyer/action-slack-build@master
|
||||
if: failure() && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/4.0')
|
||||
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
with:
|
||||
status: ${{ job.status }}
|
||||
env:
|
||||
|
@ -160,7 +154,7 @@ jobs:
|
|||
# ghost update -f -d $DIR --zip $GITHUB_WORKSPACE/ghost.zip
|
||||
|
||||
- uses: daniellockyer/action-slack-build@master
|
||||
if: failure() && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/4.0')
|
||||
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
with:
|
||||
status: ${{ job.status }}
|
||||
env:
|
||||
|
@ -169,7 +163,7 @@ jobs:
|
|||
canary:
|
||||
runs-on: ubuntu-18.04
|
||||
needs: [lint, migrations, test, ghost-cli]
|
||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/4.0')
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
name: Canary
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -189,40 +183,18 @@ jobs:
|
|||
- run: yarn
|
||||
- run: grunt master
|
||||
|
||||
- run: git checkout 4.0 && yarn
|
||||
if: github.ref == 'refs/heads/4.0'
|
||||
- run: git checkout 4.0 && yarn
|
||||
if: github.ref == 'refs/heads/4.0'
|
||||
working-directory: core/client
|
||||
|
||||
- run: echo "ghost_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
- run: echo "ghost_admin_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
working-directory: core/client
|
||||
- run: if [ -n "$(git status --porcelain)" ]; then git add core/client content/themes/casper && git commit -m "Updated Ghost-Admin and Casper"; fi
|
||||
|
||||
- run: npm version premajor --preid="pre.$ghost_hash.$ghost_admin_hash"
|
||||
if: github.ref == 'refs/heads/4.0'
|
||||
- run: npm version premajor --preid="pre.$ghost_hash.$ghost_admin_hash"
|
||||
if: github.ref == 'refs/heads/4.0'
|
||||
working-directory: core/client
|
||||
|
||||
- run: npm version preminor --preid="pre.$ghost_hash.$ghost_admin_hash"
|
||||
if: github.ref == 'refs/heads/master'
|
||||
- run: npm version preminor --preid="pre.$ghost_hash.$ghost_admin_hash"
|
||||
if: github.ref == 'refs/heads/master'
|
||||
working-directory: core/client
|
||||
|
||||
- run: grunt release --skip-update
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: github.ref == 'refs/heads/4.0'
|
||||
with:
|
||||
name: ghost-4.0-canary
|
||||
path: .dist/release/*
|
||||
retention-days: 7
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: github.ref == 'refs/heads/master'
|
||||
with:
|
||||
name: ghost-canary
|
||||
path: .dist/release/*
|
||||
|
|
Loading…
Add table
Reference in a new issue