Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 311e798

Browse files
chore(ci): update github actions
1 parent 24653d3 commit 311e798

File tree

5 files changed

+287
-45
lines changed

5 files changed

+287
-45
lines changed

‎.github/dependabot.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"

‎.github/workflows/main.yml‎

Lines changed: 0 additions & 35 deletions
This file was deleted.

‎.github/workflows/master.yml‎

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: "master"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
- name: Set up CI Image Metadata
15+
id: docker_meta_ci
16+
uses: crazy-max/ghaction-docker-meta@v1
17+
with:
18+
images: solidnerd/bookstack-dev
19+
tag-sha: true
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v1
22+
- name: Build Image
23+
uses: docker/build-push-action@v2
24+
with:
25+
context: .
26+
file: ./Dockerfile
27+
platforms: linux/amd64
28+
push: false
29+
tags: |
30+
${{ steps.docker_meta_ci.outputs.tags }}
31+
labels: ${{ steps.docker_meta_ci.outputs.labels }}
32+
cache-from: type=registry,ref=solidnerd/bookstack-dev:master
33+
outputs: type=docker,dest=/tmp/image-bookstack.tar
34+
- name: Upload artifact
35+
uses: actions/upload-artifact@v2
36+
with:
37+
name: image-bookstack-master
38+
path: /tmp/image-bookstack.tar
39+
if-no-files-found: warn
40+
e2e:
41+
runs-on: ubuntu-latest
42+
needs: build
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v2
46+
- name: Download artifact
47+
uses: actions/download-artifact@v2
48+
with:
49+
name: image-bookstack-master
50+
path: /tmp
51+
- name: Load Docker image
52+
run: |
53+
docker load --input /tmp/image-bookstack.tar
54+
docker image ls -a
55+
push:
56+
runs-on: ubuntu-20.04
57+
needs: e2e
58+
steps:
59+
- name: Checkout
60+
uses: actions/checkout@v2
61+
- name: Set up Docker Hub Image Metadata
62+
id: docker_meta
63+
uses: crazy-max/ghaction-docker-meta@v1
64+
with:
65+
images: solidnerd/bookstack,ghcr.io/solidnerd/docker-bookstack
66+
tag-semver: |
67+
{{version}}
68+
{{major}}.{{minor}}
69+
{{major}}.{{minor}}.{{patch}}
70+
- name: Download artifact
71+
uses: actions/download-artifact@v2
72+
with:
73+
name: image-bookstack-master
74+
path: /tmp
75+
if-no-files-found: warn
76+
- name: Load Docker image
77+
run: |
78+
docker load --input /tmp/image-bookstack.tar
79+
docker image ls -a
80+
- name: Set up QEMU
81+
uses: docker/setup-qemu-action@v1
82+
- name: Set up Docker Buildx
83+
uses: docker/setup-buildx-action@v1
84+
- name: Login to DockerHub
85+
if: github.event_name != 'pull_request'
86+
uses: docker/login-action@v1
87+
with:
88+
username: ${{ secrets.DOCKER_USERNAME }}
89+
password: ${{ secrets.DOCKER_PASSWORD }}
90+
- name: Login to GitHub Container Registry
91+
uses: docker/login-action@v1
92+
with:
93+
registry: ghcr.io
94+
username: ${{ github.repository_owner }}
95+
password: ${{ secrets.CR_PAT }}
96+
- name: Build and Push
97+
uses: docker/build-push-action@v2
98+
with:
99+
context: .
100+
file: ./Dockerfile
101+
platforms: linux/amd64
102+
push: ${{ github.event_name != 'pull_request' }}
103+
tags: |
104+
${{ steps.docker_meta.outputs.tags }}
105+
labels: ${{ steps.docker_meta.outputs.labels }}
106+
cache-from: type=registry,ref=solidnerd/bookstack-dev:${{ github.sha }}
107+
cache-to: type=registry,ref=solidnerd/bookstack-dev:${{ github.sha }}

‎.github/workflows/pr.yml‎

Lines changed: 45 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,58 @@
1-
name: Build and Test
1+
name: "PR"
22

33
on:
44
pull_request:
5-
6-
env:
7-
DOCKER_BUILDKIT: 1
5+
branches:
6+
- master
87

98
jobs:
109
build:
1110
runs-on: ubuntu-latest
1211
steps:
1312
- name: Checkout
1413
uses: actions/checkout@v2
15-
- name: Build Image
16-
uses: docker/build-push-action@v1
14+
- name: Docker meta ci
15+
id: docker_meta_ci
16+
uses: crazy-max/ghaction-docker-meta@v1
17+
with:
18+
images: solidnerd/bookstack-dev
19+
tag-sha: true
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v1
22+
- name: Build and push Dev
23+
uses: docker/build-push-action@v2
24+
with:
25+
context: .
26+
file: ./Dockerfile
27+
platforms: linux/amd64
28+
push: ${{ github.event_name != 'pull_request' }}
29+
tags: |
30+
${{ steps.docker_meta_ci.outputs.tags }}
31+
labels: ${{ steps.docker_meta_ci.outputs.labels }}
32+
cache-from: type=registry,ref=solidnerd/bookstack-dev:master
33+
cache-to: type=inline
34+
outputs: type=docker,dest=/tmp/image-bookstack.tar
35+
- name: Upload artifact
36+
uses: actions/upload-artifact@v2
37+
with:
38+
name: image-bookstack
39+
path: /tmp/image-bookstack.tar
40+
if-no-files-found: warn
41+
e2e:
42+
runs-on: ubuntu-latest
43+
needs: build
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v2
47+
- name: Download artifact
48+
uses: actions/download-artifact@v2
1749
with:
18-
repository: solidnerd/bookstack-dev
19-
push: false
20-
tag_with_sha: true
21-
add_git_labels: true
50+
name: image-bookstack
51+
path: /tmp
52+
if-no-files-found: warn
53+
- name: Load Docker image
54+
run: |
55+
docker load --input /tmp/image-bookstack.tar
56+
docker image ls -a
2257
- name: Execute End-to-End Test
2358
run: make e2e

‎.github/workflows/release.yml‎

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: release
2+
on:
3+
push:
4+
# Sequence of patterns matched against refs/tags
5+
tags:
6+
- '*' # Push events to matching v*, i.e. v1.0, v0.4.4
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
- name: Set up CI Image Metadata
15+
id: docker_meta_ci
16+
uses: crazy-max/ghaction-docker-meta@v1
17+
with:
18+
images: solidnerd/bookstack-dev
19+
tag-sha: true
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v1
22+
- name: Build and push Dev
23+
uses: docker/build-push-action@v2
24+
with:
25+
context: .
26+
file: ./Dockerfile
27+
platforms: linux/amd64
28+
push: false
29+
tags: |
30+
${{ steps.docker_meta_ci.outputs.tags }}
31+
labels: ${{ steps.docker_meta_ci.outputs.labels }}
32+
cache-from: type=registry,ref=solidnerd/bookstack-dev:master
33+
outputs: type=docker,dest=/tmp/image-bookstack.tar
34+
- name: Upload artifact
35+
uses: actions/upload-artifact@v2
36+
with:
37+
name: image-bookstack-master
38+
path: /tmp/image-bookstack.tar
39+
e2e:
40+
runs-on: ubuntu-latest
41+
needs: build
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v2
45+
- name: Download artifact
46+
uses: actions/download-artifact@v2
47+
with:
48+
name: image-bookstack-master
49+
path: /tmp
50+
- name: Load Docker image
51+
run: |
52+
docker load --input /tmp/image-bookstack.tar
53+
docker image ls -a
54+
push:
55+
runs-on: ubuntu-20.04
56+
needs: e2e
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@v2
60+
- name: Set up Docker Hub Image Metadata
61+
id: docker_meta
62+
uses: crazy-max/ghaction-docker-meta@v1
63+
with:
64+
images: solidnerd/bookstack,ghcr.io/solidnerd/docker-bookstack
65+
tag-semver: |
66+
{{version}}
67+
{{major}}.{{minor}}
68+
{{major}}.{{minor}}.{{patch}}
69+
- name: Download artifact
70+
uses: actions/download-artifact@v2
71+
with:
72+
name: image-bookstack-master
73+
path: /tmp
74+
- name: Load Docker image
75+
run: |
76+
docker load --input /tmp/image-bookstack.tar
77+
docker image ls -a
78+
- name: Set up QEMU
79+
uses: docker/setup-qemu-action@v1
80+
- name: Set up Docker Buildx
81+
uses: docker/setup-buildx-action@v1
82+
- name: Login to DockerHub
83+
if: github.event_name != 'pull_request'
84+
uses: docker/login-action@v1
85+
with:
86+
username: ${{ secrets.DOCKER_USERNAME }}
87+
password: ${{ secrets.DOCKER_PASSWORD }}
88+
- name: Login to GitHub Container Registry
89+
uses: docker/login-action@v1
90+
with:
91+
registry: ghcr.io
92+
username: ${{ github.repository_owner }}
93+
password: ${{ secrets.CR_PAT }}
94+
- name: Build and Push master
95+
uses: docker/build-push-action@v2
96+
with:
97+
context: .
98+
file: ./Dockerfile
99+
platforms: linux/amd64
100+
push: ${{ github.event_name != 'pull_request' }}
101+
tags: |
102+
${{ steps.docker_meta.outputs.tags }}
103+
labels: ${{ steps.docker_meta.outputs.labels }}
104+
cache-from: type=registry,ref=solidnerd/bookstack-dev:${{ github.sha }}
105+
cache-to: type=registry,ref=solidnerd/bookstack-dev:${{ github.sha }}
106+
create-release:
107+
runs-on: ubuntu-20.04
108+
needs: push
109+
steps:
110+
# To use this repository's private action, you must check out the repository
111+
- name: Checkout
112+
uses: actions/checkout@v2
113+
- name: Generate changelog
114+
id: changelog
115+
uses: metcalfc/changelog-generator@v0.4.4
116+
with:
117+
myToken: ${{ secrets.GITHUB_TOKEN }}
118+
- name: Create Release
119+
id: create_release
120+
uses: actions/create-release@v1.1.4
121+
env:
122+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123+
with:
124+
tag_name: ${{ github.ref }}
125+
release_name: ${{ github.ref }}
126+
body: ${{ steps.changelog.outputs.changelog }}
127+
draft: false
128+
prerelease: false

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /