]> source.dussan.org Git - gitblit.git/commitdiff
Fix paths after update of checkout action
authorFlorian Zschocke <f.zschocke+git@gmail.com>
Tue, 1 Nov 2022 11:50:29 +0000 (12:50 +0100)
committerFlorian Zschocke <f.zschocke+git@gmail.com>
Tue, 1 Nov 2022 13:51:10 +0000 (14:51 +0100)
The Github 'checkout' action was updated from v1 to v3. But the behaviour
changed between the two which broke this workflow.
The old action would clone other repositories not into the workspace
but parallel to the workspace. The new version does every clone/checkout
relative to the workspace. That means that where previously the
gitblit-docker repository would be cloned in parallel to the workspace
which is gitblit/gitblit, it is now cloned into the gitblit/gitblit
directory path.

So remove all the references to `../gitblit-docker`. The files are in
the current directory now.

.github/workflows/nightly-build.yml

index 38a1ff17fdbc71cdc92809dd349edd9b7077e156..5c70dd08bf30cb3c166b1bd29c5ba863b86ca254 100644 (file)
@@ -143,7 +143,6 @@ jobs:
         id: get-gb
         with:
           name: gitblit-nightly
-          path: ../gitblit-docker
 
       # Delete the artifact unless this is the official Gitblit repo
       - uses: geekyeggo/delete-artifact@v2
@@ -154,7 +153,6 @@ jobs:
 
       - name: Extract snapshot version
         id: gb-version
-        working-directory: ../gitblit-docker
         run: |
           for file in $(ls -1 ${{steps.get-gb.outputs.download-path}}) ; do
             if [[ "$file" = gitblit-*.gz ]] ; then gbver=$file ; fi
@@ -166,7 +164,6 @@ jobs:
           echo "gb-version=$gbver" >> $GITHUB_OUTPUT
 
       - name: Generate Dockerfile for snapshot image
-        working-directory: ../gitblit-docker
         run: |
           generate/generate_dockerfile.sh -v ${{ steps.gb-version.outputs.gb-version }} > generate/Dockerfile
           echo "BUILD_DATE=$(date +%Y-%m-%dT%H:%M:%S)" >> "${GITHUB_ENV}"
@@ -180,8 +177,8 @@ jobs:
       - name: Build snapshot docker image
         uses: docker/build-push-action@v3
         with:
-          file: ../gitblit-docker/generate/Dockerfile
-          context: ../gitblit-docker
+          file: generate/Dockerfile
+          context: .
           load: true
           tags: gitblit/gitblit:nightly
           labels: |
@@ -196,14 +193,12 @@ jobs:
           version: 'v0.3.16'
 
       - name: Test docker container - normal mode
-        working-directory: ../gitblit-docker
         env:
           GOSS_WAIT_OPTS: "-r 15s -s 5s > /dev/null"
         run: |
           dgoss run  -p 8080:8080  -p 8443:8443  gitblit/gitblit:nightly
 
       - name: Test docker container - bind mount
-        working-directory: ../gitblit-docker
         env:
           GOSS_WAIT_OPTS: "-r 15s -s 5s > /dev/null"
         run: |
@@ -220,7 +215,6 @@ jobs:
           sudo rm -rf gitblit-data
 
       - name: Test docker container - tmpfs
-        working-directory: ../gitblit-docker
         env:
           GOSS_WAIT_OPTS: "-r 15s -s 5s > /dev/null"
         run: |
@@ -229,8 +223,8 @@ jobs:
       - name: Push docker image to registry
         uses: docker/build-push-action@v3
         with:
-          file: ../gitblit-docker/generate/Dockerfile
-          context: ../gitblit-docker
+          file: generate/Dockerfile
+          context: .
           push: true
           tags: gitblit/gitblit:nightly
           labels: |