mirror of
https://github.com/darksaid98/ptero-nginx-egg.git
synced 2026-12-03 14:38:51 +00:00
Update release-ptero-nginx_amd64.yml
This commit is contained in:
1 parent
6fa95bf983
commit
a2d776ae4b
1 file changed
+23
-39
@@ -1,46 +1,30 @@
|
|||||||
name: nginx-ptero
|
name: Pterodactyl-Ubuntu
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: [master]
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
reason:
|
|
||||||
description: 'Why ?'
|
|
||||||
required: false
|
|
||||||
default: ''
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ghr_push:
|
push:
|
||||||
|
name: "nginx-ptero:latest"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name == 'push'
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v2
|
- uses: docker/setup-buildx-action@v1
|
||||||
|
with:
|
||||||
- name: Set up QEMU
|
version: "v0.5.1"
|
||||||
uses: docker/setup-qemu-action@v1
|
buildkitd-flags: --debug
|
||||||
|
- uses: docker/login-action@v1
|
||||||
- name: Set up Docker Buildx
|
with:
|
||||||
id: buildx
|
registry: ghcr.io
|
||||||
uses: docker/setup-buildx-action@v1
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Log-in to ghcr.io
|
- uses: docker/build-push-action@v2
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
|
with:
|
||||||
|
context: ./
|
||||||
- name: Build and push container image
|
file: ./Dockerfile
|
||||||
run: |
|
platforms: linux/amd64
|
||||||
IMAGE_ID=$(echo ghcr.io/${{ github.repository }} | tr '[A-Z]' '[a-z]')
|
push: true
|
||||||
# Strip git ref prefix from version
|
tags: |
|
||||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
ghcr.io/finnie2006/nginx-ptero:latest
|
||||||
# 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 .
|
|
||||||
Reference in new issue
Block a user