mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-22 09:02:28 +01:00
ci: tweak docker and release workflows
This commit is contained in:
parent
ca4aa795be
commit
a2970cd784
29
.github/workflows/docker.yaml
vendored
29
.github/workflows/docker.yaml
vendored
@ -1,22 +1,25 @@
|
|||||||
name: Publish Docker Image
|
name: Docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- develop
|
- develop
|
||||||
|
- 1.0-develop
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- develop
|
||||||
|
- 1.0-develop
|
||||||
release:
|
release:
|
||||||
types:
|
types:
|
||||||
- published
|
- published
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push:
|
push:
|
||||||
name: Push Image to GitHub Packages
|
name: Push
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
# Always run against a tag, even if the commit into the tag has [docker skip]
|
|
||||||
# within the commit message.
|
|
||||||
if: "!contains(github.ref, 'develop') || (!contains(github.event.head_commit.message, 'skip docker') && !contains(github.event.head_commit.message, 'docker skip'))"
|
if: "!contains(github.ref, 'develop') || (!contains(github.event.head_commit.message, 'skip docker') && !contains(github.event.head_commit.message, 'docker skip'))"
|
||||||
steps:
|
steps:
|
||||||
- name: Code Checkout
|
- name: Code checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Docker metadata
|
- name: Docker metadata
|
||||||
@ -44,25 +47,13 @@ jobs:
|
|||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Update app.php version
|
- name: Update version
|
||||||
if: "github.event_name == 'release' && github.event.action == 'published'"
|
if: "github.event_name == 'release' && github.event.action == 'published'"
|
||||||
run: |
|
run: |
|
||||||
sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php
|
sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php
|
||||||
|
|
||||||
- name: Build and Push (tag)
|
- name: Build and Push
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
if: "github.event_name == 'release' && github.event.action == 'published'"
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./Dockerfile
|
|
||||||
push: true
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
|
||||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
|
||||||
|
|
||||||
- name: Build and Push (develop)
|
|
||||||
uses: docker/build-push-action@v3
|
|
||||||
if: "github.event_name == 'push' && contains(github.ref, 'develop')"
|
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
|
6
.github/workflows/release.yaml
vendored
6
.github/workflows/release.yaml
vendored
@ -36,13 +36,13 @@ jobs:
|
|||||||
git push -u origin $BRANCH
|
git push -u origin $BRANCH
|
||||||
sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php
|
sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php
|
||||||
git add config/app.php
|
git add config/app.php
|
||||||
git commit -m "bump version for release"
|
git commit -m "ci(release): bump version"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
- name: Create release archive
|
- name: Create release archive
|
||||||
run: |
|
run: |
|
||||||
rm -rf node_modules/ test/ codecov.yml CODE_OF_CONDUCT.md CONTRIBUTING.md phpunit.xml Vagrantfile
|
rm -rf node_modules tests CODE_OF_CONDUCT.md CONTRIBUTING.md flake.lock flake.nix phpunit.xml shell.nix
|
||||||
tar -czf panel.tar.gz * .env.example .eslintignore .eslintrc.js
|
tar -czf panel.tar.gz * .editorconfig .env.example .eslintignore .eslintrc.js .gitignore .prettierrc.json
|
||||||
|
|
||||||
- name: Extract changelog
|
- name: Extract changelog
|
||||||
env:
|
env:
|
||||||
|
Loading…
Reference in New Issue
Block a user