Skip to content

0.0.3

0.0.3 #1

Workflow file for this run

name: Build
on:
release:
types: [published]
jobs:
docker:
name: "${{ github.ref_name }}: Docker Build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.HYVOR_ORG_DOCKERHUB_USERNAME }}
password: ${{ secrets.HYVOR_ORG_DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
${{ secrets.HYVOR_ORG_DOCKERHUB_USERNAME }}/unfold:${{ github.ref_name }}
${{ secrets.HYVOR_ORG_DOCKERHUB_USERNAME }}/unfold:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
file: ./docker/Dockerfile
# This ugly bit is necessary if you don't want your cache to grow forever
# until it hits GitHub's limit of 5GB.
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache