Skip to content

Commit dc83c0c

Browse files
committed
feat: add concurrency control to workflows
1 parent 53226a9 commit dc83c0c

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

.github/workflows/build-and-release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,33 @@ concurrency:
1919
cancel-in-progress: true
2020

2121
jobs:
22+
build-base:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v3
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
- name: Login to GitHub Container Registry
29+
uses: docker/login-action@v3
30+
with:
31+
registry: ghcr.io
32+
username: ${{ github.actor }}
33+
password: ${{ secrets.GHCR_PAT }}
34+
- name: Build and push base
35+
run: |
36+
docker buildx build \
37+
--platform linux/arm64 \
38+
--provenance=false \
39+
--secret id=github_token,env=GITHUB_TOKEN \
40+
--target base \
41+
--tag ghcr.io/${{ github.repository_owner }}/lambda-shell-runtime:base \
42+
--push \
43+
.
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
46+
2247
build:
48+
needs: build-base
2349
runs-on: ubuntu-latest
2450
env:
2551
HTTP_CLI_VERSION: v1.0.1

.github/workflows/build-base.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
with:
3434
registry: ghcr.io
3535
username: ${{ github.actor }}
36-
password: ${{ secrets.GITHUB_TOKEN }}
36+
password: ${{ secrets.GHCR_PAT }}
3737

3838
- name: Build and push base
3939
run: |
@@ -46,4 +46,4 @@ jobs:
4646
--push \
4747
.
4848
env:
49-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}

.github/workflows/build-installers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
with:
3030
registry: ghcr.io
3131
username: ${{ github.actor }}
32-
password: ${{ secrets.GITHUB_TOKEN }}
32+
password: ${{ secrets.GHCR_PAT }}
3333

3434
- name: Build and push installers
3535
run: |

0 commit comments

Comments
 (0)