Browse Source

Fix paths after update of checkout action

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.
pull/1277/merge
Florian Zschocke 1 year ago
parent
commit
646231e54a
1 changed files with 4 additions and 10 deletions
  1. 4
    10
      .github/workflows/nightly-build.yml

+ 4
- 10
.github/workflows/nightly-build.yml View File

id: get-gb id: get-gb
with: with:
name: gitblit-nightly name: gitblit-nightly
path: ../gitblit-docker


# Delete the artifact unless this is the official Gitblit repo # Delete the artifact unless this is the official Gitblit repo
- uses: geekyeggo/delete-artifact@v2 - uses: geekyeggo/delete-artifact@v2


- name: Extract snapshot version - name: Extract snapshot version
id: gb-version id: gb-version
working-directory: ../gitblit-docker
run: | run: |
for file in $(ls -1 ${{steps.get-gb.outputs.download-path}}) ; do for file in $(ls -1 ${{steps.get-gb.outputs.download-path}}) ; do
if [[ "$file" = gitblit-*.gz ]] ; then gbver=$file ; fi if [[ "$file" = gitblit-*.gz ]] ; then gbver=$file ; fi
echo "gb-version=$gbver" >> $GITHUB_OUTPUT echo "gb-version=$gbver" >> $GITHUB_OUTPUT


- name: Generate Dockerfile for snapshot image - name: Generate Dockerfile for snapshot image
working-directory: ../gitblit-docker
run: | run: |
generate/generate_dockerfile.sh -v ${{ steps.gb-version.outputs.gb-version }} > generate/Dockerfile 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}" echo "BUILD_DATE=$(date +%Y-%m-%dT%H:%M:%S)" >> "${GITHUB_ENV}"
- name: Build snapshot docker image - name: Build snapshot docker image
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
with: with:
file: ../gitblit-docker/generate/Dockerfile
context: ../gitblit-docker
file: generate/Dockerfile
context: .
load: true load: true
tags: gitblit/gitblit:nightly tags: gitblit/gitblit:nightly
labels: | labels: |
version: 'v0.3.16' version: 'v0.3.16'


- name: Test docker container - normal mode - name: Test docker container - normal mode
working-directory: ../gitblit-docker
env: env:
GOSS_WAIT_OPTS: "-r 15s -s 5s > /dev/null" GOSS_WAIT_OPTS: "-r 15s -s 5s > /dev/null"
run: | run: |
dgoss run -p 8080:8080 -p 8443:8443 gitblit/gitblit:nightly dgoss run -p 8080:8080 -p 8443:8443 gitblit/gitblit:nightly


- name: Test docker container - bind mount - name: Test docker container - bind mount
working-directory: ../gitblit-docker
env: env:
GOSS_WAIT_OPTS: "-r 15s -s 5s > /dev/null" GOSS_WAIT_OPTS: "-r 15s -s 5s > /dev/null"
run: | run: |
sudo rm -rf gitblit-data sudo rm -rf gitblit-data


- name: Test docker container - tmpfs - name: Test docker container - tmpfs
working-directory: ../gitblit-docker
env: env:
GOSS_WAIT_OPTS: "-r 15s -s 5s > /dev/null" GOSS_WAIT_OPTS: "-r 15s -s 5s > /dev/null"
run: | run: |
- name: Push docker image to registry - name: Push docker image to registry
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
with: with:
file: ../gitblit-docker/generate/Dockerfile
context: ../gitblit-docker
file: generate/Dockerfile
context: .
push: true push: true
tags: gitblit/gitblit:nightly tags: gitblit/gitblit:nightly
labels: | labels: |

Loading…
Cancel
Save