Skip to content

v0.5.10

v0.5.10 #579

Workflow file for this run

on:
release:
types:
- published
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
branches-ignore:
- "dependabot/**"
name: "Docker Image"
jobs:
docker:
name: "Publish to Docker"
runs-on: ubuntu-latest
env:
PLATFORMS: "${{ github.event_name == 'release' && 'linux/amd64,linux/arm64,linux/arm/v7' || 'linux/amd64' }}"
VERSION: "${{ github.event_name == 'release' && github.event.release.name || github.ref_name }}"
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
id: login
env:
token_is_present: "${{ secrets.DOCKERHUB_TOKEN && true }}"
if: ${{ env.token_is_present }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME || 'benbjohnson' }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v4
with:
images: flyio/litefs
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha
type=sha,format=long
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- uses: docker/build-push-action@v4
with:
context: .
push: ${{ steps.login.outcome != 'skipped' }}
platforms: ${{ env.PLATFORMS }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
LITEFS_VERSION=${{ env.VERSION }}
LITEFS_COMMIT=${{ github.sha }}