Added ci job to build and release docker image

This commit is contained in:
Eddy Hintze 2024-08-04 16:36:26 -04:00
parent 664ab33007
commit f92a501d69
2 changed files with 19 additions and 1 deletions

View File

@ -30,3 +30,20 @@ tag:
- export VERSION=$(grep -m 1 version pyproject.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3) - export VERSION=$(grep -m 1 version pyproject.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3)
- git tag -a $VERSION -m "Version created by gitlab-ci release" - git tag -a $VERSION -m "Version created by gitlab-ci release"
- git push origin $VERSION - git push origin $VERSION
build_image:
stage: build
image: docker:latest
services:
- docker:dind
only:
- main
- update
script:
- export VERSION=$(grep -m 1 version pyproject.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3)
- export LATEST_IMAGE_TAG=ghcr.io/${GH_REGISTRY_USER}/humblebundle-downloader:latest
- export VERSION_IMAGE_TAG=ghcr.io/${GH_REGISTRY_USER}/humblebundle-downloader:$VERSION
- echo $GH_REGISTRY_PASSWORD | docker login -u $GH_REGISTRY_USER ghcr.io --password-stdin
- docker build -t $LATEST_IMAGE_TAG -t $VERSION_IMAGE_TAG .
- docker push $LATEST_IMAGE_TAG
- docker push $VERSION_IMAGE_TAG

View File

@ -35,7 +35,8 @@ This can be done by getting a browser extension that lets you see or export your
- **Method 1 (recommended)** - **Method 1 (recommended)**
- Get the value of the cookie called `_simpleauth_sess` and pass that value using `-s 'COOKIE_VALUE'` - Get the value of the cookie called `_simpleauth_sess` and pass that value using `-s 'COOKIE_VALUE'`
- Note: The quotes in the cookie value are part of the value, you might need to wrap the entire value (including double quotes) in single quotes. - Note: The quotes in the cookie value are part of the value, you might need to wrap the entire value
(including double quotes) in single quotes. Some suggestions for common issues can be found in [issue #50](https://github.com/xtream1101/humblebundle-downloader/issues/50)
- **Method 2** - **Method 2**
- Export the cookies in the Netscape format using an extension. - Export the cookies in the Netscape format using an extension.