Skip to content

Commit fc1b073

Browse files
Add workflow to check if the docker image builds (#7)
* Add workflow to check if the docker image builds * Only check if image builds when merging to main * Pin all GHA shas
1 parent 5979e44 commit fc1b073

File tree

5 files changed

+39
-7
lines changed

5 files changed

+39
-7
lines changed

.github/workflows/image-build.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Image Build
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
build:
11+
name: Build Docker Image
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
20+
21+
- name: Build Docker image
22+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
23+
with:
24+
context: .
25+
platforms: linux/amd64,linux/arm64
26+
push: false
27+
cache-from: type=gha
28+
cache-to: type=gha,mode=max
29+
tags: plotting-mcp:latest

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Lint
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1515

1616
- name: Install uv
1717
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ jobs:
1515
tests:
1616
name: Tests
1717
uses: ./.github/workflows/test.yml
18+
image-build:
19+
name: Build Docker Image
20+
uses: ./.github/workflows/image-build.yml

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
packages: write
2121
id-token: write
2222
steps:
23-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
23+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2424

2525
- name: Set up Docker Buildx
26-
uses: docker/setup-buildx-action@v3
26+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
2727

2828
- name: Log in to GitHub Container Registry
29-
uses: docker/login-action@v3
29+
uses: docker/login-action@v184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
3030
with:
3131
registry: ghcr.io
3232
username: ${{ github.actor }}
@@ -42,7 +42,7 @@ jobs:
4242

4343
- name: Extract metadata
4444
id: meta
45-
uses: docker/metadata-action@v5
45+
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
4646
with:
4747
images: ghcr.io/${{ steps.repo_owner.outputs.OWNER }}/plotting-mcp
4848
tags: |
@@ -51,7 +51,7 @@ jobs:
5151
type=raw,value=${{ steps.tag.outputs.VERSION }}
5252
5353
- name: Build and push container
54-
uses: docker/build-push-action@v6
54+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
5555
with:
5656
context: .
5757
platforms: linux/amd64,linux/arm64

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Test
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1515

1616
- name: Install uv
1717
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3

0 commit comments

Comments
 (0)