@slashgear/gdpr-cookie-scanner 2.0.0 → 2.0.2

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.
@@ -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,28 @@ 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
+
53
+ - name: Log in to GitHub Container Registry
54
+ if: steps.changesets.outputs.published == 'true'
55
+ uses: docker/login-action@v3
56
+ with:
57
+ registry: ghcr.io
58
+ username: ${{ github.actor }}
59
+ password: ${{ secrets.GITHUB_TOKEN }}
60
+
61
+ - name: Build and push Docker image
62
+ if: steps.changesets.outputs.published == 'true'
63
+ uses: docker/build-push-action@v6
64
+ with:
65
+ context: .
66
+ push: true
67
+ tags: |
68
+ ghcr.io/${{ github.repository }}:latest
69
+ ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @slashgear/gdpr-cookie-scanner
2
2
 
3
+ ## 2.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - ec906f4: Publish Docker image automatically on every release.
8
+
9
+ 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.
10
+
11
+ ## 2.0.1
12
+
13
+ ### Patch Changes
14
+
15
+ - 469c8e8: Fix Docker image not being published on release.
16
+
17
+ The `docker.yml` workflow was triggered on `release: published`, but GitHub Actions blocks workflows using `GITHUB_TOKEN` from cascading into other workflows, so the Docker build never ran. Merged the Docker build steps directly into `release.yml`, gated on `changesets/action` reporting `published == 'true'`.
18
+
3
19
  ## 2.0.0
4
20
 
5
21
  ### Major Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slashgear/gdpr-cookie-scanner",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "CLI tool to scan websites for GDPR cookie consent compliance",
5
5
  "keywords": [
6
6
  "compliance",
@@ -1,49 +0,0 @@
1
- name: Docker
2
-
3
- on:
4
- release:
5
- types: [published]
6
-
7
- jobs:
8
- docker:
9
- runs-on: ubuntu-latest
10
- permissions:
11
- contents: read
12
- packages: write
13
-
14
- steps:
15
- - uses: actions/checkout@v6
16
-
17
- - name: Set up QEMU
18
- uses: docker/setup-qemu-action@v3
19
-
20
- - name: Set up Docker Buildx
21
- uses: docker/setup-buildx-action@v3
22
-
23
- - name: Log in to GitHub Container Registry
24
- uses: docker/login-action@v3
25
- with:
26
- registry: ghcr.io
27
- username: ${{ github.actor }}
28
- password: ${{ secrets.GITHUB_TOKEN }}
29
-
30
- - name: Extract metadata
31
- id: meta
32
- uses: docker/metadata-action@v5
33
- with:
34
- images: ghcr.io/slashgear/gdpr-cookie-scanner
35
- tags: |
36
- type=semver,pattern={{version}}
37
- type=semver,pattern={{major}}.{{minor}}
38
- type=raw,value=latest
39
-
40
- - name: Build and push
41
- uses: docker/build-push-action@v6
42
- with:
43
- context: .
44
- platforms: linux/amd64,linux/arm64
45
- push: true
46
- tags: ${{ steps.meta.outputs.tags }}
47
- labels: ${{ steps.meta.outputs.labels }}
48
- cache-from: type=gha
49
- cache-to: type=gha,mode=max