Skip to content

Commit

Permalink
Implement buildkit action
Browse files Browse the repository at this point in the history
  • Loading branch information
nktpro committed Mar 17, 2021
1 parent cd09e9a commit 7de603a
Show file tree
Hide file tree
Showing 12 changed files with 1,476 additions and 95 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,28 @@ on: # rebuild any PRs and main branch changes

jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: |
npm install
npm ci
- run: |
npm run all
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- run: chmod +r ~/.docker/config.json

- uses: ./
with:
milliseconds: 1000
context: ${{ github.workspace }}/test-context
image: shopstic/buildkit-action-test
tag: ${{ github.sha }}
28 changes: 0 additions & 28 deletions __tests__/main.test.ts

This file was deleted.

19 changes: 16 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,23 @@ name: 'buildkit-action'
description: 'Build and push a container image using buildkit'
author: 'Jacky Nguyen'
inputs:
milliseconds: # change this
buildkitImage:
required: false
description: 'Docker image reference for buildkit'
default: 'shopstic/buildkit:0.8.2'
context:
required: true
description: 'input description here'
default: 'default value if applicable'
description: 'Absolute path to build context'
image:
required: true
description: 'Image name to build and push'
tag:
required: true
description: 'Image tag to build and push'
cacheTag:
required: false
description: 'Cache tag to export and import'
default: '__buildkit_cache__'
runs:
using: 'node12'
main: 'dist/index.js'

0 comments on commit 7de603a

Please sign in to comment.