Skip to content

Commit a2970cd

Browse files
committed
ci: tweak docker and release workflows
1 parent ca4aa79 commit a2970cd

File tree

2 files changed

+13
-22
lines changed

2 files changed

+13
-22
lines changed

.github/workflows/docker.yaml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
name: Publish Docker Image
1+
name: Docker
22

33
on:
44
push:
55
branches:
66
- develop
7+
- 1.0-develop
8+
pull_request:
9+
branches:
10+
- develop
11+
- 1.0-develop
712
release:
813
types:
914
- published
1015

1116
jobs:
1217
push:
13-
name: Push Image to GitHub Packages
18+
name: Push
1419
runs-on: ubuntu-20.04
15-
# Always run against a tag, even if the commit into the tag has [docker skip]
16-
# within the commit message.
1720
if: "!contains(github.ref, 'develop') || (!contains(github.event.head_commit.message, 'skip docker') && !contains(github.event.head_commit.message, 'docker skip'))"
1821
steps:
19-
- name: Code Checkout
22+
- name: Code checkout
2023
uses: actions/checkout@v3
2124

2225
- name: Docker metadata
@@ -44,25 +47,13 @@ jobs:
4447
username: ${{ github.repository_owner }}
4548
password: ${{ secrets.REGISTRY_TOKEN }}
4649

47-
- name: Update app.php version
50+
- name: Update version
4851
if: "github.event_name == 'release' && github.event.action == 'published'"
4952
run: |
5053
sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php
5154
52-
- name: Build and Push (tag)
53-
uses: docker/build-push-action@v3
54-
if: "github.event_name == 'release' && github.event.action == 'published'"
55-
with:
56-
context: .
57-
file: ./Dockerfile
58-
push: true
59-
platforms: linux/amd64,linux/arm64
60-
labels: ${{ steps.docker_meta.outputs.labels }}
61-
tags: ${{ steps.docker_meta.outputs.tags }}
62-
63-
- name: Build and Push (develop)
55+
- name: Build and Push
6456
uses: docker/build-push-action@v3
65-
if: "github.event_name == 'push' && contains(github.ref, 'develop')"
6657
with:
6758
context: .
6859
file: ./Dockerfile

.github/workflows/release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ jobs:
3636
git push -u origin $BRANCH
3737
sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php
3838
git add config/app.php
39-
git commit -m "bump version for release"
39+
git commit -m "ci(release): bump version"
4040
git push
4141
4242
- name: Create release archive
4343
run: |
44-
rm -rf node_modules/ test/ codecov.yml CODE_OF_CONDUCT.md CONTRIBUTING.md phpunit.xml Vagrantfile
45-
tar -czf panel.tar.gz * .env.example .eslintignore .eslintrc.js
44+
rm -rf node_modules tests CODE_OF_CONDUCT.md CONTRIBUTING.md flake.lock flake.nix phpunit.xml shell.nix
45+
tar -czf panel.tar.gz * .editorconfig .env.example .eslintignore .eslintrc.js .gitignore .prettierrc.json
4646
4747
- name: Extract changelog
4848
env:

0 commit comments

Comments
 (0)