fix(ci): add secrets to build steps
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline failed

This commit is contained in:
s3lph 2023-07-25 03:34:00 +02:00
parent cb7f8ace16
commit 067fa8bcba
Signed by: s3lph
GPG key ID: 0AA29A52FB33CFB5

View file

@ -23,6 +23,10 @@ pipeline:
group: package group: package
when: when:
event: tag event: tag
secrets:
- GITEA_API_REPOSITORY_PYPI
- GITEA_API_USERNAME
- GITEA_API_PASSWORD
commands: commands:
- pip3 install -e .[test] - pip3 install -e .[test]
- python3 setup.py egg_info bdist_wheel - python3 setup.py egg_info bdist_wheel
@ -43,6 +47,8 @@ pipeline:
group: package group: package
when: when:
event: tag event: tag
secrets:
- GITEA_API_REPOSITORY_DEB
environment: environment:
- PACKAGE_AUTHOR=s3lph@kabelsalat.ch - PACKAGE_AUTHOR=s3lph@kabelsalat.ch
commands: commands:
@ -71,9 +77,11 @@ pipeline:
- chmod +x prometheus-tlsrpt-exporter/usr/bin/prometheus-tlsrpt-exporter prometheus-tlsrpt-exporter/DEBIAN/postinst prometheus-tlsrpt-exporter/DEBIAN/prerm - chmod +x prometheus-tlsrpt-exporter/usr/bin/prometheus-tlsrpt-exporter prometheus-tlsrpt-exporter/DEBIAN/postinst prometheus-tlsrpt-exporter/DEBIAN/prerm
- sed -re "s/__VERSION__/$${EXPORTER_VERSION}-1/g" -i prometheus-tlsrpt-exporter/DEBIAN/control - sed -re "s/__VERSION__/$${EXPORTER_VERSION}-1/g" -i prometheus-tlsrpt-exporter/DEBIAN/control
- dpkg-deb --build prometheus-tlsrpt-exporter - dpkg-deb --build prometheus-tlsrpt-exporter
- mv "prometheus-tlsrpt-exporter.deb" "prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}-1_all.deb"
- sudo -u nobody lintian "prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}-1_all.deb" || true - sudo -u nobody lintian "prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}-1_all.deb" || true
- >- - >-
curl curl
-u "$${GITEA_API_USERNAME}:$${GITEA_API_PASSWORD}"
-XPUT -XPUT
--data-binary "@prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}-1_all.deb" --data-binary "@prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}-1_all.deb"
$${GITEA_API_REPOSITORY_DEB} $${GITEA_API_REPOSITORY_DEB}