Skip to content

Commit

Permalink
CI: update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed May 24, 2024
1 parent cae89e7 commit 6a60c86
Showing 1 changed file with 14 additions and 46 deletions.
60 changes: 14 additions & 46 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,19 @@
name: Docker
name: "Docker"

on:
push:
branches: [master]

jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- version: "latest"

fail-fast: false

name: Docker (dockette/vercel:${{ matrix.version }})
workflow_dispatch:

steps:
- name: Checkout
uses: actions/checkout@v2

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

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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
push:
branches: ["master"]

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ matrix.version }}
restore-keys: |
${{ runner.os }}-buildx-
schedule:
- cron: "0 8 * * 1"

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: dockette/vercel:${{ matrix.version }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
platforms: linux/amd64,linux/arm64
jobs:
build:
name: "Build"
uses: dockette/.github/.github/workflows/docker.yml@master
secrets: inherit
with:
image: "dockette/vercel"
tag: "latest"

0 comments on commit 6a60c86

Please sign in to comment.