Skip to content

Commit 3423260

Browse files
authored
Use Debian Slim image to reduce image pull time (#7)
* Use Debian Slim image to reduce image pull time Signed-off-by: Dan Webb <[email protected]> * Buildx for amd64 and arm arches Signed-off-by: Dan Webb <[email protected]>
1 parent a1c374b commit 3423260

File tree

4 files changed

+29
-7
lines changed

4 files changed

+29
-7
lines changed

.github/workflows/build-container.yaml

+18-4
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,25 @@ jobs:
1212
- name: Code checkout
1313
uses: actions/checkout@v2
1414

15+
- name: Login to GitHub Container Registry
16+
uses: docker/login-action@v1
17+
with:
18+
registry: ghcr.io
19+
username: ${{ github.repository_owner }}
20+
password: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v1
24+
25+
- name: Setup buildx
26+
uses: docker/setup-buildx-action@v1
27+
with:
28+
install: true
29+
1530
- name: Build and push
1631
uses: docker/build-push-action@v2
1732
with:
1833
context: .
19-
platforms: linux/amd64
20-
push: false
21-
tags: |
22-
ghcr.io/${{ github.repository }}:edge
34+
platforms: linux/amd64,linux/arm64
35+
push: true
36+
tags: ghcr.io/${{ github.repository }}:edge

.github/workflows/publish.yaml

+9-1
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,19 @@ jobs:
2525
username: ${{ github.repository_owner }}
2626
password: ${{ secrets.GITHUB_TOKEN }}
2727

28+
- name: Set up QEMU
29+
uses: docker/setup-qemu-action@v1
30+
31+
- name: Setup buildx
32+
uses: docker/setup-buildx-action@v1
33+
with:
34+
install: true
35+
2836
- name: Build and push
2937
uses: docker/build-push-action@v2
3038
with:
3139
context: .
32-
platforms: linux/amd64
40+
platforms: linux/amd64,linux/arm64
3341
push: true
3442
tags: |
3543
ghcr.io/${{ github.repository }}:${{ steps.get_tag.outputs.VERSION }}

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python
1+
FROM python:slim
22

33
RUN pip install yamllint
44
ENV MATCHERS_DIR="._actionshub_problem-matchers"

action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: 'Jason Field'
44
description: 'Run yamllint on your yaml files with ease'
55
runs:
66
using: 'docker'
7-
image: docker://ghcr.io/actionshub/yamllint:1.0.1
7+
image: docker://ghcr.io/actionshub/yamllint:1.0.2
88
branding:
99
icon: 'edit-3'
1010
color: 'red'

0 commit comments

Comments
 (0)