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
|
run: sed "s/0.0.0/$VERSION/" -i pyproject.toml
|
||||||
|
|
||||||
- name: Workaround for bug of podman-login
|
- name: Workaround for bug of podman-login
|
||||||
|
if: fromJSON(steps.builder.outputs.run)
|
||||||
run: |
|
run: |
|
||||||
mkdir -p $HOME/.docker
|
mkdir -p $HOME/.docker
|
||||||
echo "{ \"auths\": {} }" > $HOME/.docker/config.json
|
echo "{ \"auths\": {} }" > $HOME/.docker/config.json
|
||||||
|
|
||||||
- name: Log in to the container registry (with another workaround)
|
- name: Log in to the container registry (with another workaround)
|
||||||
|
if: fromJSON(steps.builder.outputs.run)
|
||||||
uses: actions/podman-login@v1
|
uses: actions/podman-login@v1
|
||||||
with:
|
with:
|
||||||
registry: ${{ vars.REGISTRY }}
|
registry: ${{ vars.REGISTRY }}
|
||||||
|
@ -61,6 +63,7 @@ jobs:
|
||||||
auth_file_path: /tmp/auth.json
|
auth_file_path: /tmp/auth.json
|
||||||
|
|
||||||
- name: Build the container image
|
- name: Build the container image
|
||||||
|
if: fromJSON(steps.builder.outputs.run)
|
||||||
uses: actions/buildah-build@v1
|
uses: actions/buildah-build@v1
|
||||||
with:
|
with:
|
||||||
image: oidc-fastapi-test
|
image: oidc-fastapi-test
|
||||||
|
@ -71,6 +74,7 @@ jobs:
|
||||||
./Containerfile
|
./Containerfile
|
||||||
|
|
||||||
- name: Push the image to the registry
|
- name: Push the image to the registry
|
||||||
|
if: fromJSON(steps.builder.outputs.run)
|
||||||
uses: actions/push-to-registry@v2
|
uses: actions/push-to-registry@v2
|
||||||
with:
|
with:
|
||||||
registry: "docker://${{ vars.REGISTRY }}/${{ vars.ORGANISATION }}"
|
registry: "docker://${{ vars.REGISTRY }}/${{ vars.ORGANISATION }}"
|
||||||
|
@ -78,9 +82,11 @@ jobs:
|
||||||
tags: latest ${{ steps.version.outputs.version }}
|
tags: latest ${{ steps.version.outputs.version }}
|
||||||
|
|
||||||
- name: Build wheel
|
- name: Build wheel
|
||||||
|
if: fromJSON(steps.builder.outputs.run)
|
||||||
run: uv build --wheel
|
run: uv build --wheel
|
||||||
|
|
||||||
- name: Publish Python package (home)
|
- name: Publish Python package (home)
|
||||||
|
if: fromJSON(steps.builder.outputs.run)
|
||||||
env:
|
env:
|
||||||
LOCAL_PYPI_TOKEN: ${{ secrets.LOCAL_PYPI_TOKEN }}
|
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
|
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