Fix formatting of docker workflow

This commit is contained in:
Matthew Penner 2021-01-07 17:03:29 -07:00
parent 8f183e6101
commit d964e1dce1

View file

@ -1,46 +1,36 @@
name: Publish Docker Image name: Publish Docker Image
on: on:
push: push:
branches: branches:
- 'develop' - 'develop'
tags: tags:
- 'v*' - 'v*'
jobs: jobs:
push_to_registry: push_to_registry:
name: Push Image to GitHub Packages name: Push Image to GitHub Packages
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Always run against a tag, even if the commit into the tag has [docker skip] # Always run against a tag, even if the commit into the tag has [docker skip]
# within the commit message. # 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'))" if: "!contains(github.ref, 'develop') || (!contains(github.event.head_commit.message, 'skip docker') && !contains(github.event.head_commit.message, 'docker skip'))"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: crazy-max/ghaction-docker-meta@v1 - uses: crazy-max/ghaction-docker-meta@v1
id: docker_meta id: docker_meta
with: with:
images: ghcr.io/pterodactyl/panel images: ghcr.io/pterodactyl/panel
- uses: docker/setup-qemu-action@v1 - uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1 - uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1 - uses: docker/login-action@v1
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }} password: ${{ secrets.REGISTRY_TOKEN }}
- name: Bump Version - name: Bump Version
if: "!contains(github.ref, 'develop')" if: "!contains(github.ref, 'develop')"
env: env:
REF: ${{ github.ref }} REF: ${{ github.ref }}
run: | run: |
sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php
- name: Release Production Build - name: Release Production Build
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
if: "!contains(github.ref, 'develop')" if: "!contains(github.ref, 'develop')"
@ -48,7 +38,6 @@ jobs:
push: true push: true
tags: ${{ steps.docker_meta.outputs.tags }} tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }} labels: ${{ steps.docker_meta.outputs.labels }}
- name: Release Development Build - name: Release Development Build
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
if: "contains(github.ref, 'develop')" if: "contains(github.ref, 'develop')"