Skip to content

Commit 207c760

Browse files
committed
feat(ci): start using PAT
1 parent c21d412 commit 207c760

File tree

3 files changed

+34
-27
lines changed

3 files changed

+34
-27
lines changed

.github/workflows/nightly-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
uses: docker/login-action@v2
3232
with:
3333
registry: ghcr.io
34-
username: ${{ github.actor }}
35-
password: ${{ secrets.GITHUB_TOKEN }}
34+
username: jef
35+
password: ${{ secrets.DEPLOY_TOKEN }}
3636
- name: Extract metadata (tags, labels) for Docker
3737
id: docker_metadata
3838
uses: docker/metadata-action@v4

.github/workflows/publish.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build, tag, and publish
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
jobs:
7+
release_build_tag_publish:
8+
name: Create release
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Login to GitHub Container Registry
12+
uses: docker/login-action@v2
13+
with:
14+
registry: ghcr.io
15+
username: jef
16+
password: ${{ secrets.DEPLOY_TOKEN }}
17+
- name: Extract metadata (tags, labels) for Docker
18+
id: docker_metadata
19+
uses: docker/metadata-action@v4
20+
with:
21+
images: ghcr.io/${{ github.repository }}
22+
tags: |
23+
type=raw,value=latest
24+
type=semver,pattern={{version}}
25+
- name: Build and push Docker image
26+
uses: docker/build-push-action@v3
27+
with:
28+
context: .
29+
labels: ${{ steps.docker_metadata.outputs.labels }}
30+
push: true
31+
tags: ${{ steps.docker_metadata.outputs.tags }}

.github/workflows/release.yaml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,8 @@ jobs:
1414
uses: google-github-actions/release-please-action@v3
1515
id: release
1616
with:
17-
token: ${{ secrets.GITHUB_TOKEN }}
17+
token: ${{ secrets.DEPLOY_TOKEN }}
1818
release-type: node
1919
changelog-path: CHANGELOG.md
2020
package-name: streetmerchant
2121
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false},{"type":"docs","section":"Documentation","hidden":false},{"type":"refactor","section":"Refactoring","hidden":false},{"type":"perf","section":"Performance","hidden":false},{"type":"test","section":"Tests","hidden":false}]'
22-
- name: Login to GitHub Container Registry
23-
if: steps.release.outputs.release_created == 'true'
24-
uses: docker/login-action@v2
25-
with:
26-
registry: ghcr.io
27-
username: ${{ github.actor }}
28-
password: ${{ secrets.GITHUB_TOKEN }}
29-
- name: Extract metadata (tags, labels) for Docker
30-
if: steps.release.outputs.release_created == 'true'
31-
id: docker_metadata
32-
uses: docker/metadata-action@v4
33-
with:
34-
images: ghcr.io/${{ github.repository }}
35-
tags: |
36-
type=raw,value=latest
37-
type=raw,pattern=${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
38-
- name: Build and push Docker image
39-
if: steps.release.outputs.release_created == 'true'
40-
uses: docker/build-push-action@v3
41-
with:
42-
context: .
43-
labels: ${{ steps.docker_metadata.outputs.labels }}
44-
push: true
45-
tags: ${{ steps.docker_metadata.outputs.tags }}

0 commit comments

Comments
 (0)