From a2970cd7840b7224574740b66c78aad5f2a18390 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Mon, 5 Dec 2022 09:58:13 -0700 Subject: [PATCH 1/4] ci: tweak docker and release workflows --- .github/workflows/docker.yaml | 29 ++++++++++------------------- .github/workflows/release.yaml | 6 +++--- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 85dcd4b0bc..81d62f8566 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -1,22 +1,25 @@ -name: Publish Docker Image +name: Docker on: push: branches: - develop + - 1.0-develop + pull_request: + branches: + - develop + - 1.0-develop release: types: - published jobs: push: - name: Push Image to GitHub Packages + name: Push 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'))" steps: - - name: Code Checkout + - name: Code checkout uses: actions/checkout@v3 - name: Docker metadata @@ -44,25 +47,13 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.REGISTRY_TOKEN }} - - name: Update app.php version + - name: Update version if: "github.event_name == 'release' && github.event.action == 'published'" run: | sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php - - name: Build and Push (tag) - 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) + - name: Build and Push uses: docker/build-push-action@v3 - if: "github.event_name == 'push' && contains(github.ref, 'develop')" with: context: . file: ./Dockerfile diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3b5baa4c34..cbbb4b05e7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -36,13 +36,13 @@ jobs: git push -u origin $BRANCH sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php git add config/app.php - git commit -m "bump version for release" + git commit -m "ci(release): bump version" git push - name: Create release archive run: | - rm -rf node_modules/ test/ codecov.yml CODE_OF_CONDUCT.md CONTRIBUTING.md phpunit.xml Vagrantfile - tar -czf panel.tar.gz * .env.example .eslintignore .eslintrc.js + rm -rf node_modules tests CODE_OF_CONDUCT.md CONTRIBUTING.md flake.lock flake.nix phpunit.xml shell.nix + tar -czf panel.tar.gz * .editorconfig .env.example .eslintignore .eslintrc.js .gitignore .prettierrc.json - name: Extract changelog env: From e763c72d63b2353f5d313c93a6ffe35ea0fe91ad Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Mon, 5 Dec 2022 12:39:07 -0700 Subject: [PATCH 2/4] ci(docker): fix version in app.php --- .github/workflows/docker.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 81d62f8566..1d2b69ee24 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -49,8 +49,10 @@ jobs: - name: Update version if: "github.event_name == 'release' && github.event.action == 'published'" + env: + REF: ${{ github.event.release.tag_name }} run: | - sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php + sed -i "s/ 'version' => 'canary',/ 'version' => '${REF}',/" config/app.php - name: Build and Push uses: docker/build-push-action@v3 From 411017198ee9cb24c2426fcbf338c51d96ccbf4a Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Mon, 5 Dec 2022 13:16:03 -0700 Subject: [PATCH 3/4] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67fd49fdf2..1001003478 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ This file is a running track of new features and fixes to each version of the pa This project follows [Semantic Versioning](http://semver.org) guidelines. +## v1.11.1 +### Fixed +* Fixed Panel Docker image showing `canary` as it's version. + ## v1.11.0 ### Changed (since 1.10.4) * Changed minimum PHP version requirement from `7.4` to `8.0`. From 3432cadd4af095a769912aaca5aaab90b4b47146 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Mon, 5 Dec 2022 15:43:10 -0700 Subject: [PATCH 4/4] ci(docker): fix version starting with `v` prefix --- .github/workflows/docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 1d2b69ee24..6026b38379 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -52,7 +52,7 @@ jobs: env: REF: ${{ github.event.release.tag_name }} run: | - sed -i "s/ 'version' => 'canary',/ 'version' => '${REF}',/" config/app.php + sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:1}',/" config/app.php - name: Build and Push uses: docker/build-push-action@v3