Skip to content

Update crazy-max/ghaction-docker-meta action to v5.6.1 #151

Update crazy-max/ghaction-docker-meta action to v5.6.1

Update crazy-max/ghaction-docker-meta action to v5.6.1 #151

Workflow file for this run

name: 'Publish Docker Image'
on:
push:
branches:
- 'master'
pull_request:
jobs:
push_to_registry:
name: Push Image to GitHub Packages
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[push skip]')"
steps:
- name: 'Check out'
uses: actions/checkout@v4
- name: 'Docker meta'
uses: crazy-max/[email protected]
id: docker_meta
with:
images: ghcr.io/ZentriaMC/pterodactyl-docker
tags: |-
type=sha,enable=true
type=ref,enable=true,priority=600,prefix=,suffix=,event=branch
type=ref,enable=true,priority=600,prefix=pr-,suffix=,event=pr
- name: 'Log in into ghcr.io'
uses: docker/login-action@v3
if: "github.event_name != 'pull_request'"
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 'Build only'
uses: docker/build-push-action@v5
if: "github.event_name == 'pull_request'"
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
- name: 'Build and publish'
uses: docker/build-push-action@v5
if: "github.event_name != 'pull_request'"
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}