Skip to content

Commit

Permalink
feat: github migration [EXT-5015] (#2211)
Browse files Browse the repository at this point in the history
* feat: github migration [EXT-5015]

* adding vault context

* moving to install dependencies

* adding logging

* fix: [] - fix build

---------

Co-authored-by: Cormac de Barra <cormac.debarra@contentful.com>
  • Loading branch information
1 parent 753d8f6 commit c340727
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
11 changes: 9 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ commands:
keys:
- npm-cache-{{ arch }}-{{ checksum ".nvmrc" }}-{{ checksum "package-lock.json" }}
- npm-cache
- vault/get-secrets:
template-preset: 'packages-read'
- run: echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_READ_TOKEN}" > ~/.npmrc
- run: echo "@contentful:registry=https://npm.pkg.github.com" >> ~/.npmrc
- run: npm ci --prefer-offline

cache-dependencies:
Expand All @@ -40,6 +44,8 @@ commands:
steps:
- vault/get-secrets:
template-preset: 'semantic-release-ecosystem'
- run: echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_WRITE_TOKEN}" > ~/.npmrc
- run: echo "@contentful:registry=https://npm.pkg.github.com" >> ~/.npmrc

jobs:
prepare:
Expand Down Expand Up @@ -90,15 +96,16 @@ jobs:
executor: docker-with-node
steps:
- checkout
- use-vault
- install-dependencies
- use-vault
- run: npm run semantic-release

workflows:
version: 2
build_and_test:
jobs:
- prepare
- prepare:
context: vault
- build:
requires:
- prepare
Expand Down
8 changes: 7 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
version: 2

registries:
npm-github:
type: npm-registry
url: https://npm.pkg.github.com
token: ${{secrets.NPM_REGISTRY_REGISTRY_GH_ORG_TOKEN}}
updates:
- package-ecosystem: npm
registries:
- npm-github
directory: "/"
schedule:
interval: daily
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c340727

Please sign in to comment.