@codfish/actions-playground 0.0.0-PR-63--844cab2 → 0.0.0-PR-66--6b9a32a

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.
@@ -45,11 +45,29 @@ jobs:
45
45
  DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
46
46
  GCR_TOKEN: ${{ secrets.GCR_TOKEN }}
47
47
 
48
+ - name: Set up QEMU
49
+ uses: docker/setup-qemu-action@v3
50
+ with:
51
+ platforms: arm64
52
+
53
+ - name: Set up Docker Buildx
54
+ uses: docker/setup-buildx-action@v3
55
+
48
56
  - name: docker build
49
57
  run: docker build -t codfish/actions-playground:latest .
50
58
 
59
+ - name: Upload Text file
60
+ if: github.ref == 'refs/heads/main'
61
+ uses: actions/upload-artifact@v4
62
+ with:
63
+ github-token: ${{ secrets.GITHUB_TOKEN }}
64
+ name: text-file-${{ github.ref_name }}
65
+ path: text.txt
66
+
67
+ - run: cat Dockerfile
68
+
51
69
  - name: semantic-release
52
- uses: docker://ghcr.io/codfish/semantic-release-action@sha256:9e0bbcc4ca3b3611668dcf911e51432573efb3222587c4ca1cc8a759c1b8283c
70
+ uses: docker://ghcr.io/codfish/semantic-release-action@sha256:71048986f7e28f024cbad0ef106a7ef20b9b0d322f3a8aa51d89f1c424e75061
53
71
  id: semantic
54
72
  with:
55
73
  additional-packages: |
@@ -62,32 +80,14 @@ jobs:
62
80
  {
63
81
  'replacements': [
64
82
  {
65
- 'files': ['Dockerfile'],
83
+ 'files': ['Dockerfile'],
66
84
  'from': 'RELEASE_VERSION=.*',
67
- 'to': 'RELEASE_VERSION=${nextRelease.version}',
68
- 'results': [
69
- {
70
- 'file': 'Dockerfile',
71
- 'hasChanged': true,
72
- 'numMatches': 1,
73
- 'numReplacements': 1
74
- }
75
- ],
76
- 'countMatches': true
85
+ 'to': 'RELEASE_VERSION=${nextRelease.version}'
77
86
  },
78
87
  {
79
88
  'files': ['provisioning/Chart.yml'],
80
89
  'from': 'ersion: .*',
81
- 'to': 'ersion: ${nextRelease.version}',
82
- 'results': [
83
- {
84
- 'file': 'provisioning/Chart.yml',
85
- 'hasChanged': true,
86
- 'numMatches': 2,
87
- 'numReplacements': 2
88
- }
89
- ],
90
- 'countMatches': true
90
+ 'to': 'ersion: ${nextRelease.version}'
91
91
  }
92
92
  ]
93
93
  }
@@ -151,24 +151,49 @@ jobs:
151
151
  run: |
152
152
  echo $DOCKER_TAGS;
153
153
 
154
- - name: push docker images to dockerhub & GCR
155
- if: steps.semantic.outputs.new-release-published == 'true'
154
+ # Step to create a list of tags to push to GCR always including the latest tag and optionally
155
+ # the new release tag and major release tag.
156
+ - name: Create tags list
157
+ id: tags
158
+ shell: bash
156
159
  run: |
157
- docker tag codfish/actions-playground ghcr.io/codfish/actions-playground:latest
158
- docker tag codfish/actions-playground codfish/actions-playground:$VERSION_TAG
159
- docker tag codfish/actions-playground codfish/actions-playground:$MAJOR_TAG
160
- docker tag codfish/actions-playground ghcr.io/codfish/actions-playground:$VERSION_TAG
161
- docker tag codfish/actions-playground ghcr.io/codfish/actions-playground:$MAJOR_TAG
162
-
163
- docker push codfish/actions-playground:latest
164
- docker push codfish/actions-playground:$VERSION_TAG
165
- docker push codfish/actions-playground:$MAJOR_TAG
166
- docker push ghcr.io/codfish/actions-playground:latest
167
- docker push ghcr.io/codfish/actions-playground:$VERSION_TAG
168
- docker push ghcr.io/codfish/actions-playground:$MAJOR_TAG
169
- env:
170
- VERSION_TAG: v${{ steps.semantic.outputs.release-version }}
171
- MAJOR_TAG: v${{ steps.semantic.outputs.release-major }}
160
+ TAGS="codfish/actions-playground:latest,ghcr.io/codfish/actions-playground:latest"
161
+ if [ "${{ steps.semantic.outputs.new-release-published }}" == "true" ]; then
162
+ TAGS="${TAGS},codfish/actions-playground:v${{ steps.semantic.outputs.release-version }}"
163
+ TAGS="${TAGS},codfish/actions-playground:v${{ steps.semantic.outputs.release-major }}"
164
+ TAGS="${TAGS},ghcr.io/codfish/actions-playground:v${{ steps.semantic.outputs.release-version }}"
165
+ TAGS="${TAGS},ghcr.io/codfish/actions-playground:v${{ steps.semantic.outputs.release-major }}"
166
+ fi
167
+ echo "tags=${TAGS}" >> "$GITHUB_OUTPUT"
168
+
169
+ # Push docker images to GCR
170
+ # Dockerhub is auto synced with the repo, no need to explicitly deploy
171
+ - name: Build and push docker images to GCR
172
+ uses: docker/build-push-action@v5
173
+ with:
174
+ context: .
175
+ platforms: linux/arm64,linux/amd64
176
+ push: true
177
+ tags: ${{ steps.tags.outputs.tags }}
178
+ # - name: push docker images to dockerhub & GCR
179
+ # if: steps.semantic.outputs.new-release-published == 'true'
180
+ # run: |
181
+ # docker tag codfish/actions-playground ghcr.io/codfish/actions-playground:latest
182
+ # docker tag codfish/actions-playground codfish/actions-playground:$VERSION_TAG
183
+ # docker tag codfish/actions-playground codfish/actions-playground:$MAJOR_TAG
184
+ # docker tag codfish/actions-playground ghcr.io/codfish/actions-playground:$VERSION_TAG
185
+ # docker tag codfish/actions-playground ghcr.io/codfish/actions-playground:$MAJOR_TAG
186
+ #
187
+ # docker push codfish/actions-playground:latest
188
+ # docker push codfish/actions-playground:$VERSION_TAG
189
+ # docker push codfish/actions-playground:$MAJOR_TAG
190
+ # docker push ghcr.io/codfish/actions-playground:latest
191
+ # docker push ghcr.io/codfish/actions-playground:$VERSION_TAG
192
+ # docker push ghcr.io/codfish/actions-playground:$MAJOR_TAG
193
+ # env:
194
+ # VERSION_TAG: v${{ steps.semantic.outputs.release-version }}
195
+ # MAJOR_TAG: v${{ steps.semantic.outputs.release-major }}
196
+
172
197
  # - name: build docs
173
198
  # run: |
174
199
  # npm ci --no-save
@@ -0,0 +1,52 @@
1
+ name: Troubleshooting Github Actions
2
+
3
+ on: pull_request_target
4
+
5
+ jobs:
6
+ troubleshooting:
7
+ runs-on: ubuntu-latest
8
+
9
+ steps:
10
+ - uses: actions/checkout@v3
11
+
12
+ - run: printenv
13
+
14
+ - name: docker login
15
+ run: |
16
+ echo "$DOCKER_PASSWORD" | docker login -u $DOCKER_USERNAME --password-stdin
17
+ echo "$GCR_TOKEN" | docker login ghcr.io -u codfish --password-stdin
18
+ env:
19
+ DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
20
+ DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
21
+ GCR_TOKEN: ${{ secrets.GCR_TOKEN }}
22
+
23
+ # https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions
24
+ - name: Dump GitHub context
25
+ env:
26
+ GITHUB_CONTEXT: ${{ toJson(github) }}
27
+ run: echo "$GITHUB_CONTEXT"
28
+
29
+ - name: Dump strategy context
30
+ env:
31
+ STRATEGY_CONTEXT: ${{ toJson(strategy) }}
32
+ run: echo "$STRATEGY_CONTEXT"
33
+
34
+ - name: Dump matrix context
35
+ env:
36
+ MATRIX_CONTEXT: ${{ toJson(matrix) }}
37
+ run: echo "$MATRIX_CONTEXT"
38
+
39
+ - name: Dump job context
40
+ env:
41
+ JOB_CONTEXT: ${{ toJson(job) }}
42
+ run: echo "$JOB_CONTEXT"
43
+
44
+ - name: Dump runner context
45
+ env:
46
+ RUNNER_CONTEXT: ${{ toJson(runner) }}
47
+ run: echo "$RUNNER_CONTEXT"
48
+
49
+ - name: Dump steps context
50
+ env:
51
+ STEPS_CONTEXT: ${{ toJson(steps) }}
52
+ run: echo "$STEPS_CONTEXT"
@@ -50,6 +50,11 @@ jobs:
50
50
  if: steps.npm-cache.outputs.cache-hit != 'true'
51
51
  run: npm ci --prefer-offline --no-audit
52
52
 
53
+ - name: Retrieve text file
54
+ uses: actions/download-artifact@v4
55
+ with:
56
+ github-token: ${{ secrets.GITHUB_TOKEN }}
57
+
53
58
  - run:
54
59
  npm run lint:commit -- --from="origin/${{ github.base_ref }}"
55
60
  --to="origin/${{github.head_ref }}"
package/Dockerfile CHANGED
@@ -10,7 +10,7 @@ RUN npm ci
10
10
  COPY ./src ./src
11
11
  COPY ./public ./public
12
12
 
13
- ENV RELEASE_VERSION=5.7.0
13
+ ENV RELEASE_VERSION=6.2.1
14
14
 
15
15
  RUN npm run build
16
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codfish/actions-playground",
3
- "version": "0.0.0-PR-63--844cab2",
3
+ "version": "0.0.0-PR-66--6b9a32a",
4
4
  "description": "My own testing ground for messing around with GitHub Actions.",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -1,3 +1,3 @@
1
- appVersion: 5.7.0
1
+ appVersion: 6.2.1
2
2
  name: actions-playground
3
- version: 5.7.0
3
+ version: 6.2.1
package/test.txt CHANGED
@@ -3,3 +3,11 @@ testing dry run outputs
3
3
  test release with a chore
4
4
 
5
5
  test latest release
6
+
7
+ feature release 2
8
+
9
+ breaking update
10
+
11
+ test again
12
+
13
+ another one