Skip to content

Re-use restylers manifest logic in promote #24

Re-use restylers manifest logic in promote

Re-use restylers manifest logic in promote #24

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: main
jobs:
image:
runs-on: ubuntu-latest
steps:
- id: meta
uses: docker/metadata-action@v4
with:
images: restyled/sdk
tags: |
type=edge
type=ref,event=branch
type=sha,prefix=
- uses: docker/setup-buildx-action@v2
- uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-image-${{ github.sha }}
restore-keys: |
${{ runner.os }}-image-
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- uses: docker/build-push-action@v4
with:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Avoids ever-growing cache hitting limits
- run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache