misc_pterodactyl-panel/.github/workflows/docker.yml

41 lines
1.3 KiB
YAML
Raw Normal View History

name: Publish Docker Image
on:
push:
branches:
- 'develop'
tags:
- 'v*'
jobs:
push_to_registry:
2020-11-15 04:06:58 +00:00
name: Push Image to GitHub Packages
runs-on: ubuntu-latest
2020-11-15 04:15:46 +00:00
# Always run against a tag, even if the commit into the tag has [docker skip]
# within the commit message.
if: "!contains(github.ref, 'develop') || (!contains(github.event.head_commit.message, 'skip docker') && !contains(github.event.head_commit.message, 'docker skip'))"
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Release Production Build
uses: docker/build-push-action@v2
2020-11-15 04:06:58 +00:00
if: "!contains(github.ref, 'develop')"
env:
2020-11-15 04:27:11 +00:00
REF: ${{ github.ref }}
with:
push: true
tags: |
ghcr.io/pterodactyl/panel:latest
2020-11-15 04:27:11 +00:00
ghcr.io/pterodactyl/panel:${REF:11}
- name: Release Development Build
uses: docker/build-push-action@v2
2020-11-15 04:06:58 +00:00
if: "contains(github.ref, 'develop')"
with:
push: true
tags: |
ghcr.io/pterodactyl/panel:develop