forked from Nitrate/Nitrate
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.26 KB
/
distribution.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Distribution
on: push
jobs:
pypi:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5
with:
python-version: '3.10'
- name: make sdist
run: |
python3 -m venv venv
./venv/bin/pip install build
./venv/bin/python3 -m build --sdist
- name: Publish sdist package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_token }}
build-and-push-images:
name: Build and push images
needs: pypi
runs-on: ubuntu-24.04
steps:
- run: sudo apt-get install -y make python3 python3-pip podman
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
repository: Nitrate/containers
- name: Build all images and push them to registry
run: |
echo "${{ secrets.quay_token }}" | \
docker login -u "${{ secrets.quay_username }}" --password-stdin quay.io
git_ref="${{ github.ref }}"
make all-images push-all version=${git_ref##refs/tags/v}