@@ -11,14 +11,18 @@ jobs:
1111 steps :
1212 - name : Checkout
1313 uses : actions/checkout@v3
14+
1415 - name : Set up CI Image Metadata
1516 id : docker_meta_ci
16- uses : crazy-max/ghaction-docker-meta@v1
17+ uses : docker/metadata-action@v4
1718 with :
1819 images : solidnerd/bookstack-dev
19- tag-sha : true
20+ tags : |
21+ type=sha
22+
2023 - name : Set up Docker Buildx
2124 uses : docker/setup-buildx-action@v2
25+
2226 - name : Build and push Dev
2327 uses : docker/build-push-action@v3
2428 with :
@@ -31,66 +35,79 @@ jobs:
3135 labels : ${{ steps.docker_meta_ci.outputs.labels }}
3236 cache-from : type=registry,ref=solidnerd/bookstack-dev:master
3337 outputs : type=docker,dest=/tmp/image-bookstack.tar
38+
3439 - name : Upload artifact
3540 uses : actions/upload-artifact@v3
3641 with :
3742 name : image-bookstack-master
3843 path : /tmp/image-bookstack.tar
44+
3945 e2e :
4046 runs-on : ubuntu-latest
4147 needs : build
4248 steps :
4349 - name : Checkout
4450 uses : actions/checkout@v3
51+
4552 - name : Download artifact
4653 uses : actions/download-artifact@v3
4754 with :
4855 name : image-bookstack-master
4956 path : /tmp
57+
5058 - name : Load Docker image
5159 run : |
5260 docker load --input /tmp/image-bookstack.tar
5361 docker image ls -a
62+
5463 push :
5564 runs-on : ubuntu-20.04
5665 needs : e2e
5766 steps :
5867 - name : Checkout
5968 uses : actions/checkout@v3
69+
6070 - name : Set up Docker Hub Image Metadata
6171 id : docker_meta
62- uses : crazy-max/ghaction-docker-meta@v1
72+ uses : docker/metadata-action@v4
6373 with :
6474 images : solidnerd/bookstack,ghcr.io/solidnerd/docker-bookstack
65- tag-semver : |
66- {{version}}
67- {{major}}.{{minor}}
68- {{major}}.{{minor}}.{{patch}}
75+ tags :
76+ type=semver,pattern={{version}}
77+ type=semver,pattern={{major}}.{{minor}}
78+ type=semver,pattern={{major}}.{{minor}}.{{patch}}
79+
6980 - name : Download artifact
7081 uses : actions/download-artifact@v3
7182 with :
7283 name : image-bookstack-master
7384 path : /tmp
85+
7486 - name : Load Docker image
7587 run : |
7688 docker load --input /tmp/image-bookstack.tar
7789 docker image ls -a
90+
7891 - name : Set up QEMU
7992 uses : docker/setup-qemu-action@v2
93+
8094 - name : Set up Docker Buildx
8195 uses : docker/setup-buildx-action@v2
96+
8297 - name : Login to DockerHub
8398 if : github.event_name != 'pull_request'
8499 uses : docker/login-action@v2
85100 with :
86101 username : ${{ secrets.DOCKER_USERNAME }}
87102 password : ${{ secrets.DOCKER_PASSWORD }}
103+
88104 - name : Login to GitHub Container Registry
89- uses : docker/login-action@v2
105+ uses : docker/login-action@v2
90106 with :
91107 registry : ghcr.io
92108 username : ${{ github.repository_owner }}
93109 password : ${{ secrets.CR_PAT }}
110+
94111 - name : Build and Push master
95112 uses : docker/build-push-action@v3
96113 with :
@@ -103,18 +120,21 @@ jobs:
103120 labels : ${{ steps.docker_meta.outputs.labels }}
104121 cache-from : type=registry,ref=solidnerd/bookstack-dev:${{ github.sha }}
105122 cache-to : type=registry,ref=solidnerd/bookstack-dev:${{ github.sha }}
123+
106124 create-release :
107125 runs-on : ubuntu-20.04
108126 needs : push
109127 steps :
110128 # To use this repository's private action, you must check out the repository
111129 - name : Checkout
112130 uses : actions/checkout@v3
131+
113132 - name : Generate changelog
114133 id : changelog
115134 uses : metcalfc/changelog-generator@v3.0.0
116135 with :
117136 myToken : ${{ secrets.GITHUB_TOKEN }}
137+
118138 - name : Create Release
119139 id : create_release
120140 uses : actions/create-release@v1.1.4
0 commit comments