This repository has been archived on 2024-09-20. You can view files and clone it, but cannot push or open issues or pull requests.
workflows/README.md

71 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2023-12-05 15:30:42 +01:00
# reusable workflows for 44net git
> [docs](https://docs.github.com/en/actions/using-workflows/reusing-workflows)
## examples
### build a container
from `44net/docker-images`
```yml
jobs:
build-debian-base:
uses: actions/workflows/.gitea/workflows/build_container.yml@master
env:
IMAGE_NAME: debian-base
with:
registry: ${{ env.REGISTRY }}
image-name: ${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}
context: ${{ env.IMAGE_NAME }}
dockerfile: ${{ env.IMAGE_NAME }}/Dockerfile
platforms: linux/amd64,linux/arm64
secrets:
cr-username: ${{ secrets.CR_USERNAME }}
cr-password: ${{ secrets.CR_PASSWORD }}
```
### run tests (python)
from `44net/fftools`
```yml
jobs:
check-code:
uses: actions/workflows/.gitea/workflows/check_python_hatch.yml@master
with:
run-tests: true
```
### scan with sonar-scanner (python)
from `44net/fftools`
```yml
jobs:
scan-code:
uses: actions/workflows/.gitea/workflows/sonarqube_python.yml@master
needs: [check-code]
if: gitea.event_name != 'pull_request'
with:
2023-12-05 15:37:30 +01:00
run-coverage: true
2023-12-05 15:30:42 +01:00
secrets:
sonar-host: ${{ secrets.SONARQUBE_HOST }}
sonar-token: ${{ secrets.SONARQUBE_TOKEN }}
```
### build and release package (python)
from `44net/fftools`
```yml
jobs:
build-pypackage:
uses: actions/workflows/.gitea/workflows/release_pypackage.yml@master
with:
repository: https://git.44net.ch/api/packages/44net/pypi
secrets:
username: actions-bot
token: ${{ secrets.PACKAGE_TOKEN }}
```