mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Updated CI workflow for 3.x branch changes
- this branch is now the maintenance branch for 3.x so we don't want to build canary packages on it - also updates the Slack notification if-statements to check if we're on the 3.x branch
This commit is contained in:
parent
8737267001
commit
59c51f3862
1 changed files with 3 additions and 67 deletions
70
.github/workflows/test.yml
vendored
70
.github/workflows/test.yml
vendored
|
@ -3,8 +3,6 @@ on:
|
|||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '4.0'
|
||||
- 3.*
|
||||
- 2.x
|
||||
- 'renovate/*'
|
||||
|
@ -23,7 +21,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/3.x'
|
||||
with:
|
||||
status: ${{ job.status }}
|
||||
env:
|
||||
|
@ -108,7 +106,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/3.x'
|
||||
with:
|
||||
status: ${{ job.status }}
|
||||
env:
|
||||
|
@ -154,70 +152,8 @@ 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/3.x'
|
||||
with:
|
||||
status: ${{ job.status }}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
|
||||
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')
|
||||
name: Canary
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '12.18.0'
|
||||
|
||||
- name: Set up Git
|
||||
run: |
|
||||
git config --global pull.rebase true
|
||||
git config --global user.name "Ghost CI"
|
||||
git config --global user.email "ghost@example.com"
|
||||
|
||||
- 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/*
|
||||
retention-days: 7
|
||||
|
|
Loading…
Reference in a new issue