Skip to content

Commit

Permalink
Merge pull request #174 from ThePooN/ci-docker-builds-commits
Browse files Browse the repository at this point in the history
👷 Also build on every commit, tagging as on our other repos
  • Loading branch information
peppy committed Sep 28, 2022
2 parents 1164df4 + 01f182b commit 5fc1fc1
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Build and publish

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

Expand All @@ -14,6 +17,24 @@ jobs:
uses: actions/checkout@v2
with:
submodules: recursive
-
name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
pppy/osu-performance
# generate Docker tags based on the following events/attributes
# on tag event: tag using git tag, and as latest if the tag doesn't contain hyphens (pre-releases)
# on push event: tag using git sha, branch name and as latest-dev
tags: |
type=raw,value=latest,enable=${{ github.ref_type == 'tag' && !contains(github.ref_name, '-') }}
type=raw,value=latest-dev,enable=${{ github.ref_type == 'branch' && github.ref_name == 'master' }}
type=raw,value=${{ github.ref_name }}
type=raw,value=${{ github.sha }},enable=${{ github.ref_type == 'branch' }}
flavor: |
latest=false
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand All @@ -31,4 +52,5 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: pppy/osu-performance:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 5fc1fc1

Please sign in to comment.