Skip to content

Bump peter-evans/create-pull-request from 6 to 7 #192

Bump peter-evans/create-pull-request from 6 to 7

Bump peter-evans/create-pull-request from 6 to 7 #192

Workflow file for this run

---
name: Create packages and test installation
on:
pull_request:
permissions: read-all
jobs:
sdist:
name: build python sdist
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
- name: Build sdist
run: |
pip install tox
python setup.py sdist
- name: Get version
id: version
run: echo "version=$(python setup.py --version)" >> "$GITHUB_OUTPUT"
- name: Upload output file
uses: actions/upload-artifact@v3
with:
name: sdist
path: dist/*tar.gz
ubuntu:
name: build debs
needs: sdist
runs-on: ubuntu-latest
container: ubuntu:xenial
steps:
- uses: actions/download-artifact@v3
with:
name: sdist
- name: install build requistes
run: |
apt-get update -q
apt-get install -q -y devscripts debhelper git
apt-get install -q -y python-all-dev python-pbr python-setuptools
- name: build packages
run: |
tar -xzf cloud_info_provider-${{ needs.sdist.outputs.version }}.tar.gz \
--strip-components 1
sed -i -e "1s/(.*)/(${{ needs.sdist.outputs.version }}-1)/" \
debian/changelog
debuild --no-tgz-check clean binary
cd debs/cloud-info-provider-openstack
sed -i -e "1s/(.*)/(${{ needs.sdist.outputs.version }}-1)/" \
debian/changelog
debuild --no-tgz-check clean binary
cd ../../debs/cloud-info-provider-opennebula
sed -i -e "1s/(.*)/(${{ needs.sdist.outputs.version }}-1)/" \
debian/changelog
debuild --no-tgz-check clean binary
cd ../..
mv debs/*.deb .
mv ../*.deb .
- name: Upload debs
uses: actions/upload-artifact@v3
with:
name: debs
path: |
python-cloud-info-provider_${{ needs.sdist.outputs.version }}-1_all.deb
python-cloud-info-provider-opennebula_${{ needs.sdist.outputs.version }}-1_all.deb
python-cloud-info-provider-openstack_${{ needs.sdist.outputs.version }}-1_all.deb
ubuntu-install-openstack:
name: install debs (openstack)
needs: ubuntu
runs-on: ubuntu-latest
container: ubuntu:xenial
steps:
- uses: actions/download-artifact@v3
with:
name: debs
- name: install generated debs
run: |
apt-get update
apt-get install -y ./python-cloud-info-provider_*.deb \
./python-cloud-info-provider-openstack_*.deb
ubuntu-install-opennebula:
name: install debs (opennebula)
needs: ubuntu
runs-on: ubuntu-latest
container: ubuntu:xenial
steps:
- uses: actions/download-artifact@v3
with:
name: debs
- name: install generated debs
run: |
apt-get update
apt-get install -y ./python-cloud-info-provider_*.deb \
./python-cloud-info-provider-opennebula_*.deb