Skip to content

Commit

Permalink
Add more docker tags (docker/metadata-action)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenisanerd committed Jul 28, 2023
1 parent bf3eae1 commit b40b019
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
name: "pre-release"

on:
push:
branches:
- "master"
on: [push]

env:
IMAGE_NAME: ${{ github.repository }}

jobs:
pre-release-docker:
Expand All @@ -13,15 +13,31 @@ jobs:


steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha,format=long
type=sha
type=semver,pattern=v{{major}}.{{minor}}.{{patch}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=ref,event=tag
type=ref,event=branch
- uses: docker/setup-qemu-action@v1

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

- uses: docker/login-action@v1
- uses: docker/login-action@v2
with:
username: "${{ secrets.DOCKER_HUB_USER }}"
password: "${{ secrets.DOCKER_HUB_TOKEN }}"
Expand All @@ -33,4 +49,5 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: "${{ secrets.DOCKER_REPO }}:latest"
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit b40b019

Please sign in to comment.