@slashgear/gdpr-cookie-scanner 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +28 -0
- package/CHANGELOG.md +16 -0
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ jobs:
|
|
|
10
10
|
permissions:
|
|
11
11
|
contents: write
|
|
12
12
|
pull-requests: write
|
|
13
|
+
packages: write
|
|
13
14
|
|
|
14
15
|
steps:
|
|
15
16
|
- uses: actions/checkout@v6
|
|
@@ -31,6 +32,7 @@ jobs:
|
|
|
31
32
|
run: pnpm build
|
|
32
33
|
|
|
33
34
|
- name: Create release PR or publish to npm
|
|
35
|
+
id: changesets
|
|
34
36
|
uses: changesets/action@v1
|
|
35
37
|
with:
|
|
36
38
|
publish: pnpm changeset publish
|
|
@@ -40,3 +42,29 @@ jobs:
|
|
|
40
42
|
env:
|
|
41
43
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
42
44
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
45
|
+
|
|
46
|
+
- name: Extract published version
|
|
47
|
+
if: steps.changesets.outputs.published == 'true'
|
|
48
|
+
id: version
|
|
49
|
+
run: |
|
|
50
|
+
VERSION=$(echo '${{ steps.changesets.outputs.publishedPackages }}' | jq -r '.[0].version')
|
|
51
|
+
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
52
|
+
echo "image=ghcr.io/$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
|
|
53
|
+
|
|
54
|
+
- name: Log in to GitHub Container Registry
|
|
55
|
+
if: steps.changesets.outputs.published == 'true'
|
|
56
|
+
uses: docker/login-action@v3
|
|
57
|
+
with:
|
|
58
|
+
registry: ghcr.io
|
|
59
|
+
username: ${{ github.actor }}
|
|
60
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
61
|
+
|
|
62
|
+
- name: Build and push Docker image
|
|
63
|
+
if: steps.changesets.outputs.published == 'true'
|
|
64
|
+
uses: docker/build-push-action@v6
|
|
65
|
+
with:
|
|
66
|
+
context: .
|
|
67
|
+
push: true
|
|
68
|
+
tags: |
|
|
69
|
+
${{ steps.version.outputs.image }}:latest
|
|
70
|
+
${{ steps.version.outputs.image }}:${{ steps.version.outputs.version }}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @slashgear/gdpr-cookie-scanner
|
|
2
2
|
|
|
3
|
+
## 2.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- cc8b0dc: Fix Docker image tags using lowercase repository name.
|
|
8
|
+
|
|
9
|
+
`github.repository` can contain uppercase letters (e.g. `Slashgear/gdpr-cookie-scanner`), which is rejected by the OCI registry spec. The image name is now lowercased via `tr '[:upper:]' '[:lower:]'` before being passed to `docker/build-push-action`.
|
|
10
|
+
|
|
11
|
+
## 2.0.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- ec906f4: Publish Docker image automatically on every release.
|
|
16
|
+
|
|
17
|
+
When `changesets/action` publishes a new version to npm, the release workflow now logs in to the GitHub Container Registry (ghcr.io) and pushes the Docker image tagged with both `latest` and the exact semver version (e.g. `ghcr.io/slashgear/gdpr-cookie-scanner:2.0.2`). The `packages: write` permission is added to the job for this purpose.
|
|
18
|
+
|
|
3
19
|
## 2.0.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|