Skip to content

Commit

Permalink
ci: [@dependabot] fix npm package-ecosystem x yarn integration
Browse files Browse the repository at this point in the history
  • Loading branch information
unicornware committed Jan 2, 2023
1 parent 8ccaf59 commit c18e3e2
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

---
version: 2
registries:
github:
replaces-base: true
token: ${{ secrets.PAT_BOT }}
type: npm-registry
url: https://npm.pkg.github.com/flex-development
updates:
- package-ecosystem: github-actions
commit-message:
Expand All @@ -28,6 +34,8 @@ updates:
labels:
- scope:dependencies
- type:build
registries:
- github
reviewers:
- flex-development/dependabot-review
- flexdevelopment
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
gpr:
needs: metadata
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
environment:
Expand All @@ -68,6 +69,9 @@ jobs:
uses: actions/checkout@v3.2.0
with:
ref: ${{ format('refs/tags/{0}', env.TAG) }}
- id: npmrc-cleanup
name: Remove stale .npmrc file
run: rm .npmrc
- id: npmrc
name: Setup .npmrc file
uses: actions/setup-node@v3.5.1
Expand All @@ -83,6 +87,8 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm:
needs: [metadata, gpr]
permissions:
contents: write
runs-on: ubuntu-latest
environment:
name: npm
Expand All @@ -95,6 +101,9 @@ jobs:
uses: actions/checkout@v3.2.0
with:
ref: ${{ format('refs/tags/{0}', env.TAG) }}
- id: npmrc-cleanup
name: Remove stale .npmrc file
run: rm .npmrc
- id: npmrc
name: Setup .npmrc file
uses: actions/setup-node@v3.5.1
Expand Down
5 changes: 5 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://docs.npmjs.com/cli/configuring-npm/npmrc

@flex-development:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${PAT_BOT}
//npm.pkg.github.com/:always-auth=true
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ nodeLinker: node-modules
npmScopes:
flex-development:
npmAlwaysAuth: true
npmAuthToken: ${GITHUB_TOKEN}
npmAuthToken: ${GITHUB_TOKEN:-$PAT_BOT}
npmRegistryServer: https://npm.pkg.github.com

patchFolder: ./patches
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Follow the steps below to setup your local development environment:
| ----------------------- |
| `GITHUB_TOKEN` |
| `NODE_NO_WARNINGS` |
| `PAT_BOT` |
| `ZSH_DOTENV_FILE` |
#### GitHub Actions
Expand Down

0 comments on commit c18e3e2

Please sign in to comment.