@@ -11,14 +11,17 @@ jobs:
1111 steps :
1212 - name : Checkout
1313 uses : actions/checkout@v3
14+
1415 - name : Set up CI Image Metadata
1516 id : docker_meta_ci
1617 uses : crazy-max/ghaction-docker-meta@v1
1718 with :
1819 images : solidnerd/bookstack-dev
1920 tag-sha : true
21+
2022 - name : Set up Docker Buildx
2123 uses : docker/setup-buildx-action@v2
24+
2225 - name : Build and push Dev
2326 uses : docker/build-push-action@v3
2427 with :
@@ -31,32 +34,38 @@ jobs:
3134 labels : ${{ steps.docker_meta_ci.outputs.labels }}
3235 cache-from : type=registry,ref=solidnerd/bookstack-dev:master
3336 outputs : type=docker,dest=/tmp/image-bookstack.tar
37+
3438 - name : Upload artifact
3539 uses : actions/upload-artifact@v3
3640 with :
3741 name : image-bookstack-master
3842 path : /tmp/image-bookstack.tar
43+
3944 e2e :
4045 runs-on : ubuntu-latest
4146 needs : build
4247 steps :
4348 - name : Checkout
4449 uses : actions/checkout@v3
50+
4551 - name : Download artifact
4652 uses : actions/download-artifact@v3
4753 with :
4854 name : image-bookstack-master
4955 path : /tmp
56+
5057 - name : Load Docker image
5158 run : |
5259 docker load --input /tmp/image-bookstack.tar
5360 docker image ls -a
61+
5462 push :
5563 runs-on : ubuntu-20.04
5664 needs : e2e
5765 steps :
5866 - name : Checkout
5967 uses : actions/checkout@v3
68+
6069 - name : Set up Docker Hub Image Metadata
6170 id : docker_meta
6271 uses : crazy-max/ghaction-docker-meta@v1
@@ -66,31 +75,38 @@ jobs:
6675 {{version}}
6776 {{major}}.{{minor}}
6877 {{major}}.{{minor}}.{{patch}}
78+
6979 - name : Download artifact
7080 uses : actions/download-artifact@v3
7181 with :
7282 name : image-bookstack-master
7383 path : /tmp
84+
7485 - name : Load Docker image
7586 run : |
7687 docker load --input /tmp/image-bookstack.tar
7788 docker image ls -a
89+
7890 - name : Set up QEMU
7991 uses : docker/setup-qemu-action@v2
92+
8093 - name : Set up Docker Buildx
8194 uses : docker/setup-buildx-action@v2
95+
8296 - name : Login to DockerHub
8397 if : github.event_name != 'pull_request'
8498 uses : docker/login-action@v2
8599 with :
86100 username : ${{ secrets.DOCKER_USERNAME }}
87101 password : ${{ secrets.DOCKER_PASSWORD }}
102+
88103 - name : Login to GitHub Container Registry
89- uses : docker/login-action@v2
104+ uses : docker/login-action@v2
90105 with :
91106 registry : ghcr.io
92107 username : ${{ github.repository_owner }}
93108 password : ${{ secrets.CR_PAT }}
109+
94110 - name : Build and Push master
95111 uses : docker/build-push-action@v3
96112 with :
@@ -103,18 +119,21 @@ jobs:
103119 labels : ${{ steps.docker_meta.outputs.labels }}
104120 cache-from : type=registry,ref=solidnerd/bookstack-dev:${{ github.sha }}
105121 cache-to : type=registry,ref=solidnerd/bookstack-dev:${{ github.sha }}
122+
106123 create-release :
107124 runs-on : ubuntu-20.04
108125 needs : push
109126 steps :
110127 # To use this repository's private action, you must check out the repository
111128 - name : Checkout
112129 uses : actions/checkout@v3
130+
113131 - name : Generate changelog
114132 id : changelog
115133 uses : metcalfc/changelog-generator@v3.0.0
116134 with :
117135 myToken : ${{ secrets.GITHUB_TOKEN }}
136+
118137 - name : Create Release
119138 id : create_release
120139 uses : actions/create-release@v1.1.4
0 commit comments