Skip to content

Commit

Permalink
use GitHub Actions to build Docker container (#1181)
Browse files Browse the repository at this point in the history
Start using GitHub Actions to build the Docker container for this
project. Builds all tags and master as the latest container tag. Builds
for amd64 and arm64.
  • Loading branch information
cardoe authored Jul 7, 2022
1 parent 9829f05 commit d91fbbf
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: docker

on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- master

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: docker/setup-qemu-action@v1

- uses: docker/setup-buildx-action@v1

- id: meta
uses: docker/metadata-action@v3
with:
images: mher/flower
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- uses: docker/login-action@v1
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit d91fbbf

Please sign in to comment.