Skip to content

Commit 03fed28

Browse files
authored
Add provenance and SBOM (#145)
1 parent 4b803d4 commit 03fed28

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v6
2323
- name: Get version
24-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
24+
id: get_version
25+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
2526

2627
- uses: actions/setup-node@v6
2728
with:
@@ -63,21 +64,24 @@ jobs:
6364
uses: docker/build-push-action@v6
6465
with:
6566
context: .
66-
platforms: linux/amd64
67+
platforms: linux/amd64,linux/arm64
6768
push: ${{ github.event_name != 'pull_request' }}
6869
tags: ${{ steps.meta.outputs.tags }}
6970
labels: ${{ steps.meta.outputs.labels }}
70-
cache-from: type=gha
71-
cache-to: type=gha,mode=max
71+
annotations: ${{ steps.meta.outputs.annotations }}
72+
provenance: true
73+
sbom: true
74+
cache-to: type=inline
75+
cache-from: type=registry,ref=brantburnett/couchbase-index-manager:latest
7276

7377
- name: Publish to NPM
7478
if: startsWith(github.ref, 'refs/tags/') # Only on tags
7579
run: |
76-
npm run lerna -- version ${{ env.RELEASE_VERSION }} --no-git-tag-version --exact -y &&
80+
npm run lerna -- version ${{ steps.get_version.outputs.RELEASE_VERSION }} --no-git-tag-version --exact -y &&
7781
pushd packages/couchbase-index-manager && npm publish && popd &&
7882
pushd packages/couchbase-index-manager-cli && npm publish && popd
7983
env:
80-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
84+
NPM_CONFIG_PROVENANCE: true
8185

8286
- name: Pack NPM
8387
if: ${{!startsWith(github.ref, 'refs/tags/')}} # Only on non-tags

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20 as build
1+
FROM node:20 AS build
22

33
WORKDIR /app
44
COPY ["package*.json", "lerna.json", "./"]

0 commit comments

Comments
 (0)