Skip to content

Commit

Permalink
fix: Updated github actions to use new branch names (#863)
Browse files Browse the repository at this point in the history
  • Loading branch information
daylesalmon committed Aug 4, 2021
1 parent 5408fb7 commit e61a75f
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ updates:
schedule:
interval: daily
open-pull-requests-limit: 0
target-branch: 'release'
target-branch: 'next-release'
commit-message:
prefix: '[skip netlify]'
6 changes: 3 additions & 3 deletions .github/workflows/branch-guard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# if the base_ref(target branch we want to merge to) is master and the head_ref(source branch we want to merge from)
# Then throw an error, as only release is allowed to merge into master
# if the base_ref(target branch we want to merge to) is main and the head_ref(source branch we want to merge from)
# Then throw an error, as only next-release is allowed to merge into main
# Otherwise this action won't run and show as success
name: 'Branch guard 🛡️'

Expand All @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Checking if branch is allowed...
if: "github.base_ref == 'master' && github.head_ref != 'release'"
if: "github.base_ref == 'main' && github.head_ref != 'next-release'"
run: |
echo "";
echo "::error::Not allowed to merge '$GITHUB_HEAD_REF' branch into '$GITHUB_BASE_REF' branch";
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: 'Code scanning - action'

on:
push:
branches: [master, release]
branches: [main, next-release]
pull_request:
# The branches below must be a subset of the branches above
branches: [master, release]
branches: [main, next-release]
schedule:
- cron: '0 22 * * 4'

Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:

#- run: |
# make bootstrap
# make release
# make next-release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
4 changes: 2 additions & 2 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: 'Lint PR title'
on:
pull_request:
branches:
- release
- next-release
types: [opened, edited, synchronize]

jobs:
lint:
name: Linting PR title
runs-on: ubuntu-latest
if: "startsWith(github.base_ref, 'release')"
if: "startsWith(github.base_ref, 'next-release')"
steps:
- uses: amannn/action-semantic-pull-request@v1.2.0
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: nwtgck/actions-netlify@v1.1.11
with:
publish-dir: './build'
production-branch: master
production-branch: main
production-deploy: false
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'PR #${{ github.event.number }}'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-notes-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release-Notes-Preview

on:
pull_request:
branches: [master]
branches: [main]
issue_comment:
types: [edited]

Expand All @@ -15,7 +15,7 @@ jobs:
git fetch --prune --unshallow --tags
- uses: snyk/release-notes-preview@v1.6.1
with:
releaseBranch: master
releaseBranch: main
env:
GITHUB_PR_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release npm package
on:
push:
branches:
- master
- main

jobs:
release:
Expand Down Expand Up @@ -55,13 +55,13 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.SEMVER_GITHUB_TOKEN }}
# Deploy build folder to Netlify IF the branch is master
# Deploy build folder to Netlify IF the branch is main
- name: Deploy to Netlify
if: github.ref == 'refs/heads/master' && !startsWith(github.event.head_commit.message, 'ci:') && !contains(github.event.head_commit.message, '[skip netlify]')
if: github.ref == 'refs/heads/main' && !startsWith(github.event.head_commit.message, 'ci:') && !contains(github.event.head_commit.message, '[skip netlify]')
uses: nwtgck/actions-netlify@v1.1.11
with:
publish-dir: './build'
production-branch: master
production-branch: main
production-deploy: true
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: '${{ github.event.head_commit.message }}'
Expand Down

0 comments on commit e61a75f

Please sign in to comment.