From 9ffb5d299587702871ae83141bc7bba419b651dc Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 14 Nov 2020 19:56:43 -0800 Subject: [PATCH] Add support for automated docker builds --- .github/workflows/docker.yml | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 000000000..90006393a --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,37 @@ +name: Publish Docker Image +on: + push: + branches: + - 'develop' + tags: + - 'v*' +jobs: + push_to_registry: + name: Push Image to Github Packages + runs-on: ubuntu-latest + 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 + if: contains(github.ref, 'develop') != true + env: + GITHUB_REF: ${{ github.ref }} + with: + push: true + tags: | + ghcr.io/pterodactyl/panel:latest + ghcr.io/pterodactyl/panel:${GITHUB_REF} + - name: Release Development Build + uses: docker/build-push-action@v2 + if: contains(github.ref, 'develop') + with: + push: true + tags: | + ghcr.io/pterodactyl/panel:develop