mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-11 14:02:05 +00:00
Fix GitHub release trigger actions borked
https://github.com/actions/runner/issues/2788
This commit is contained in:
parent
275fdc4280
commit
0b9e680753
31
.github/workflows/build-docker-image.yml
vendored
31
.github/workflows/build-docker-image.yml
vendored
@ -4,6 +4,11 @@ on:
|
|||||||
release:
|
release:
|
||||||
types:
|
types:
|
||||||
- published
|
- published
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
release:
|
||||||
|
description: 'Tag name to build'
|
||||||
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -33,11 +38,23 @@ jobs:
|
|||||||
repository: pmmp/PocketMine-Docker
|
repository: pmmp/PocketMine-Docker
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Get tag names
|
|
||||||
|
- name: Get tag name
|
||||||
id: tag-name
|
id: tag-name
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(echo "${{ github.ref }}" | sed 's{^refs/tags/{{')
|
if [[ "${{ github.event_name }}" == "release" ]]; then
|
||||||
echo TAG_NAME=$VERSION >> $GITHUB_OUTPUT
|
echo TAG_NAME="${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||||
|
echo TAG_NAME="${{ github.event.inputs.release }}" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "Unsupported event type: ${{ github.event_name }}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Parse version
|
||||||
|
id: version
|
||||||
|
run: |
|
||||||
|
VERSION="${{ steps.tag-name.outputs.TAG_NAME }}"
|
||||||
echo MAJOR=$(echo $VERSION | cut -d. -f1) >> $GITHUB_OUTPUT
|
echo MAJOR=$(echo $VERSION | cut -d. -f1) >> $GITHUB_OUTPUT
|
||||||
echo MINOR=$(echo $VERSION | cut -d. -f1-2) >> $GITHUB_OUTPUT
|
echo MINOR=$(echo $VERSION | cut -d. -f1-2) >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
@ -71,8 +88,8 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
context: ./pocketmine-mp
|
context: ./pocketmine-mp
|
||||||
tags: |
|
tags: |
|
||||||
${{ steps.docker-repo-name.outputs.NAME }}:${{ steps.tag-name.outputs.MAJOR }}
|
${{ steps.docker-repo-name.outputs.NAME }}:${{ steps.version.outputs.MAJOR }}
|
||||||
ghcr.io/${{ steps.docker-repo-name.outputs.NAME }}:${{ steps.tag-name.outputs.MAJOR }}
|
ghcr.io/${{ steps.docker-repo-name.outputs.NAME }}:${{ steps.version.outputs.MAJOR }}
|
||||||
build-args: |
|
build-args: |
|
||||||
PMMP_TAG=${{ steps.tag-name.outputs.TAG_NAME }}
|
PMMP_TAG=${{ steps.tag-name.outputs.TAG_NAME }}
|
||||||
PMMP_REPO=${{ github.repository }}
|
PMMP_REPO=${{ github.repository }}
|
||||||
@ -84,8 +101,8 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
context: ./pocketmine-mp
|
context: ./pocketmine-mp
|
||||||
tags: |
|
tags: |
|
||||||
${{ steps.docker-repo-name.outputs.NAME }}:${{ steps.tag-name.outputs.MINOR }}
|
${{ steps.docker-repo-name.outputs.NAME }}:${{ steps.version.outputs.MINOR }}
|
||||||
ghcr.io/${{ steps.docker-repo-name.outputs.NAME }}:${{ steps.tag-name.outputs.MINOR }}
|
ghcr.io/${{ steps.docker-repo-name.outputs.NAME }}:${{ steps.version.outputs.MINOR }}
|
||||||
build-args: |
|
build-args: |
|
||||||
PMMP_TAG=${{ steps.tag-name.outputs.TAG_NAME }}
|
PMMP_TAG=${{ steps.tag-name.outputs.TAG_NAME }}
|
||||||
PMMP_REPO=${{ github.repository }}
|
PMMP_REPO=${{ github.repository }}
|
||||||
|
17
.github/workflows/discord-release-notify.yml
vendored
17
.github/workflows/discord-release-notify.yml
vendored
@ -4,6 +4,11 @@ on:
|
|||||||
release:
|
release:
|
||||||
types:
|
types:
|
||||||
- published
|
- published
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
release:
|
||||||
|
description: 'Release to make notification for'
|
||||||
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -30,9 +35,17 @@ jobs:
|
|||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: composer install --no-dev --prefer-dist --no-interaction --ignore-platform-reqs
|
run: composer install --no-dev --prefer-dist --no-interaction --ignore-platform-reqs
|
||||||
|
|
||||||
- name: Get actual tag name
|
- name: Get tag name
|
||||||
id: tag-name
|
id: tag-name
|
||||||
run: echo TAG_NAME=$(echo "${{ github.ref }}" | sed 's{^refs/tags/{{') >> $GITHUB_OUTPUT
|
run: |
|
||||||
|
if [[ "${{ github.event_name }}" == "release" ]]; then
|
||||||
|
echo TAG_NAME="${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||||
|
echo TAG_NAME="${{ github.event.inputs.release }}" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "Unsupported event type: ${{ github.event_name }}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Run webhook post script
|
- name: Run webhook post script
|
||||||
run: php .github/workflows/discord-release-embed.php ${{ github.repository }} ${{ steps.tag-name.outputs.TAG_NAME }} ${{ github.token }} ${{ secrets.DISCORD_RELEASE_WEBHOOK }} ${{ secrets.DISCORD_NEWS_PING_ROLE_ID }}
|
run: php .github/workflows/discord-release-embed.php ${{ github.repository }} ${{ steps.tag-name.outputs.TAG_NAME }} ${{ github.token }} ${{ secrets.DISCORD_RELEASE_WEBHOOK }} ${{ secrets.DISCORD_NEWS_PING_ROLE_ID }}
|
||||||
|
17
.github/workflows/update-updater-api.yml
vendored
17
.github/workflows/update-updater-api.yml
vendored
@ -4,6 +4,11 @@ on:
|
|||||||
release:
|
release:
|
||||||
types:
|
types:
|
||||||
- published
|
- published
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
release:
|
||||||
|
description: 'Release to publish info for'
|
||||||
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -19,9 +24,17 @@ jobs:
|
|||||||
repository: ${{ github.repository_owner }}/update.pmmp.io
|
repository: ${{ github.repository_owner }}/update.pmmp.io
|
||||||
ssh-key: ${{ secrets.UPDATE_PMMP_IO_DEPLOY_KEY }}
|
ssh-key: ${{ secrets.UPDATE_PMMP_IO_DEPLOY_KEY }}
|
||||||
|
|
||||||
- name: Get actual tag name
|
- name: Get tag name
|
||||||
id: tag-name
|
id: tag-name
|
||||||
run: echo TAG_NAME=$(echo "${{ github.ref }}" | sed 's{^refs/tags/{{') >> $GITHUB_OUTPUT
|
run: |
|
||||||
|
if [[ "${{ github.event_name }}" == "release" ]]; then
|
||||||
|
echo TAG_NAME="${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||||
|
echo TAG_NAME="${{ github.event.inputs.release }}" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "Unsupported event type: ${{ github.event_name }}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Download new release information
|
- name: Download new release information
|
||||||
run: curl -f -L ${{ github.server_url }}/${{ github.repository }}/releases/download/${{ steps.tag-name.outputs.TAG_NAME }}/build_info.json -o new_build_info.json
|
run: curl -f -L ${{ github.server_url }}/${{ github.repository }}/releases/download/${{ steps.tag-name.outputs.TAG_NAME }}/build_info.json -o new_build_info.json
|
||||||
|
Loading…
x
Reference in New Issue
Block a user