From a2d776ae4bf083433150f504b50fd3d56d5fb0d8 Mon Sep 17 00:00:00 2001 From: finnie2006 <57916807+finnie2006@users.noreply.github.com> Date: Wed, 12 Jan 2022 17:42:04 +0100 Subject: [PATCH] Update release-ptero-nginx_amd64.yml --- .../workflows/release-ptero-nginx_amd64.yml | 62 +++++++------------ 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/.github/workflows/release-ptero-nginx_amd64.yml b/.github/workflows/release-ptero-nginx_amd64.yml index 8efb138..0015099 100644 --- a/.github/workflows/release-ptero-nginx_amd64.yml +++ b/.github/workflows/release-ptero-nginx_amd64.yml @@ -1,46 +1,30 @@ -name: nginx-ptero +name: Pterodactyl-Ubuntu on: - push: - branches: [master] workflow_dispatch: - inputs: - reason: - description: 'Why ?' - required: false - default: '' jobs: - ghr_push: + push: + name: "nginx-ptero:latest" runs-on: ubuntu-latest - if: github.event_name == 'push' - + strategy: + fail-fast: false steps: - - name: checkout - uses: actions/checkout@v2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - - name: Log-in to ghcr.io - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Build and push container image - run: | - IMAGE_ID=$(echo ghcr.io/${{ github.repository }} | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # when the branch is master, replace master with latest - [ "$VERSION" == "master" ] && VERSION=latest - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - # Build and Publish container image - docker buildx build --push \ - --tag $IMAGE_ID:$VERSION \ - --platform linux/amd64,linux/arm/v7,linux/arm64 . + - uses: actions/checkout@v2 + - uses: docker/setup-buildx-action@v1 + with: + version: "v0.5.1" + buildkitd-flags: --debug + - uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v2 + with: + context: ./ + file: ./Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/finnie2006/nginx-ptero:latest