CI: build only if git clean tag
This commit is contained in:
parent
af49242192
commit
fefe44acfe
1 changed files with 6 additions and 0 deletions
|
@ -48,11 +48,13 @@ jobs:
|
|||
run: sed "s/0.0.0/$VERSION/" -i pyproject.toml
|
||||
|
||||
- name: Workaround for bug of podman-login
|
||||
if: fromJSON(steps.builder.outputs.run)
|
||||
run: |
|
||||
mkdir -p $HOME/.docker
|
||||
echo "{ \"auths\": {} }" > $HOME/.docker/config.json
|
||||
|
||||
- name: Log in to the container registry (with another workaround)
|
||||
if: fromJSON(steps.builder.outputs.run)
|
||||
uses: actions/podman-login@v1
|
||||
with:
|
||||
registry: ${{ vars.REGISTRY }}
|
||||
|
@ -61,6 +63,7 @@ jobs:
|
|||
auth_file_path: /tmp/auth.json
|
||||
|
||||
- name: Build the container image
|
||||
if: fromJSON(steps.builder.outputs.run)
|
||||
uses: actions/buildah-build@v1
|
||||
with:
|
||||
image: oidc-fastapi-test
|
||||
|
@ -71,6 +74,7 @@ jobs:
|
|||
./Containerfile
|
||||
|
||||
- name: Push the image to the registry
|
||||
if: fromJSON(steps.builder.outputs.run)
|
||||
uses: actions/push-to-registry@v2
|
||||
with:
|
||||
registry: "docker://${{ vars.REGISTRY }}/${{ vars.ORGANISATION }}"
|
||||
|
@ -78,9 +82,11 @@ jobs:
|
|||
tags: latest ${{ steps.version.outputs.version }}
|
||||
|
||||
- name: Build wheel
|
||||
if: fromJSON(steps.builder.outputs.run)
|
||||
run: uv build --wheel
|
||||
|
||||
- name: Publish Python package (home)
|
||||
if: fromJSON(steps.builder.outputs.run)
|
||||
env:
|
||||
LOCAL_PYPI_TOKEN: ${{ secrets.LOCAL_PYPI_TOKEN }}
|
||||
run: uv publish --publish-url https://code.philo.ydns.eu/api/packages/philorg/pypi --token $LOCAL_PYPI_TOKEN
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue