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
- 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
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}"
- 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: |
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: |
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: |
- 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: |