Skip to content

Commit

Permalink
Add docker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrisbin committed Jan 29, 2025
1 parent 1fa71b2 commit 12feccb
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Docker

on:
pull_request:

release:
types: [published]

jobs:
docker:
runs-on: ubuntu-latest
steps:
# Only log in if we're going to push
- if: ${{ github.event_name == 'release' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- id: meta
uses: docker/metadata-action@v5
with:
images: restyled-io/restylers-whitespace

- uses: docker/build-push-action@v6
with:
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: ${{ github.event_name == 'release' }}

0 comments on commit 12feccb

Please sign in to comment.