Skip to content

Commit

Permalink
Merge pull request #300 from nugit/feature/node-upgrades
Browse files Browse the repository at this point in the history
Update GitHub Actions
  • Loading branch information
limtingzhi authored May 27, 2024
2 parents 3d15e2b + 84320d6 commit 313c306
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 54 deletions.
Binary file removed .DS_Store
Binary file not shown.
36 changes: 18 additions & 18 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
version: 2

updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "weekly"
day: "monday"
time: "22:00"
interval: 'weekly'
day: 'monday'
time: '22:00'
allow:
- dependency-type: "direct"
target-branch: "develop"
- dependency-type: 'direct'
target-branch: 'develop'
commit-message:
prefix: "fix:"
prefix-development: "chore:"
prefix: 'fix:'
prefix-development: 'chore:'
versioning-strategy: increase
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
- dependency-name: '*'
update-types: ['version-update:semver-major']

- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "weekly"
day: "monday"
time: "22:00"
target-branch: "develop"
interval: 'weekly'
day: 'monday'
time: '22:00'
target-branch: 'develop'
commit-message:
prefix: "chore:"
prefix: 'chore:'
7 changes: 4 additions & 3 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Create Release

on:
schedule:
- cron: '* * 1 * *'
push:
branches:
- 'develop'

jobs:
release:
Expand All @@ -15,4 +16,4 @@ jobs:
head: develop
base: master
title: Next Release
reviewers: 'moroine,limtingzhi'
reviewers: 'limtingzhi'
6 changes: 0 additions & 6 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@ on:
jobs:
auto-merge:
runs-on: ubuntu-latest

permissions:
pull-requests: write
contents: write

steps:
- uses: fastify/github-action-merge-dependabot@v3
with:
target: minor
merge-method: merge
use-github-auto-merge: true
github-token: ${{ secrets.GH_TOKEN }}

auto-approve:
runs-on: ubuntu-latest
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
node-version: '16'
cache: 'npm'
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- run: echo '//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}' > .npmrc
- run: npm ci
# https://github.com/dhoulb/multi-semantic-release#npm-v85-npm-err-notarget-no-matching-version-found-for
- run: npm config set workspaces-update false
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ name: Check

on:
push:
branches:
- 'master'
- 'develop'
pull_request:

jobs:
check:
if: (github.event_name != 'pull_request_target') || (github.event.pull_request.merged == true)
uses: ./.github/workflows/test.yml
secrets: inherit
with:
event_name: ${{ github.event_name }}
22 changes: 0 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: Test

on:
workflow_call:
inputs:
event_name:
required: true
type: string
secrets:
NPM_TOKEN:
required: true
Expand All @@ -18,27 +14,9 @@ jobs:
statuses: write
steps:
- uses: actions/checkout@v4
- id: git-sha
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- if: ${{ inputs.event_name == 'pull_request_target' }}
name: Set commit status as pending
uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
context: check / check
sha: ${{ steps.git-sha.outputs.sha }}
- uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'npm'
- run: npm ci
- run: npm run lint
- if: ${{ inputs.event_name == 'pull_request_target' }}
name: Set commit status
uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
context: check / check
sha: ${{ steps.git-sha.outputs.sha }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
node_modules/

.npmrc

.DS_Store
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Nugit
Copyright (c) 2024 Nugit

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit 313c306

Please sign in to comment.