Skip to content

Commit

Permalink
Use Debian Slim image to reduce image pull time (#7)
Browse files Browse the repository at this point in the history
* Use Debian Slim image to reduce image pull time

Signed-off-by: Dan Webb <dan.webb@damacus.io>

* Buildx for amd64 and arm arches

Signed-off-by: Dan Webb <dan.webb@damacus.io>
  • Loading branch information
damacus committed Apr 14, 2022
1 parent a1c374b commit 3423260
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/build-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,25 @@ jobs:
- name: Code checkout
uses: actions/checkout@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Setup buildx
uses: docker/setup-buildx-action@v1
with:
install: true

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
push: false
tags: |
ghcr.io/${{ github.repository }}:edge
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ github.repository }}:edge
10 changes: 9 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,19 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Setup buildx
uses: docker/setup-buildx-action@v1
with:
install: true

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ steps.get_tag.outputs.VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python
FROM python:slim

RUN pip install yamllint
ENV MATCHERS_DIR="._actionshub_problem-matchers"
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: 'Jason Field'
description: 'Run yamllint on your yaml files with ease'
runs:
using: 'docker'
image: docker://ghcr.io/actionshub/yamllint:1.0.1
image: docker://ghcr.io/actionshub/yamllint:1.0.2
branding:
icon: 'edit-3'
color: 'red'

0 comments on commit 3423260

Please sign in to comment.