Skip to content

Commit

Permalink
poc
Browse files Browse the repository at this point in the history
  • Loading branch information
valentijnscholten committed Jan 18, 2021
1 parent 38da42f commit dae38f1
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/poc-buildkit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Cachte-It!
on:
workflow_dispatch:
pull_request:
push:

jobs:
poc:
runs-on: ubuntu-latest
steps:
# disabled login as it leaves plain text credentials behind

# - name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v2

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master

- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
shell: bash

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ steps.get-date.outputs.date }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build
uses: docker/build-push-action@v2
with:
push: false
tags: valentijn/app:latest
builder: ${{ steps.buildx.outputs.name }}
file: ./Dockerfile
context: .
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

- name: Up
run: DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose up --no-build

0 comments on commit dae38f1

Please sign in to comment.