Update release-ptero-nginx_amd64.yml

This commit is contained in:
finnie2006 authored and GitHub committed 2022-01-12 17:19:24 +01:00
1 parent b65a321aca
commit 6fa95bf983
1 file changed
+39 -23
+39 -23
View File
@@ -1,30 +1,46 @@
name: Pterodactyl-Ubuntu name: nginx-ptero
on: on:
push:
branches: [master]
workflow_dispatch: workflow_dispatch:
inputs:
reason:
description: 'Why ?'
required: false
default: ''
jobs: jobs:
push: ghr_push:
name: "nginx-ptero:latest"
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: if: github.event_name == 'push'
fail-fast: false
steps: steps:
- uses: actions/checkout@v2 - name: checkout
- uses: docker/setup-buildx-action@v1 uses: actions/checkout@v2
with:
version: "v0.5.1" - name: Set up QEMU
buildkitd-flags: --debug uses: docker/setup-qemu-action@v1
- uses: docker/login-action@v1
with: - name: Set up Docker Buildx
registry: ghcr.io id: buildx
username: ${{ github.repository_owner }} uses: docker/setup-buildx-action@v1
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v2 - name: Log-in to ghcr.io
with: run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
context: ./
file: ./Dockerfile - name: Build and push container image
platforms: linux/amd64 run: |
push: true IMAGE_ID=$(echo ghcr.io/${{ github.repository }} | tr '[A-Z]' '[a-z]')
tags: | # Strip git ref prefix from version
ghcr.io/finnie2006/nginx-ptero:latest 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 .