Drone migrate release pipeline #602
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
tags: | |
- 'v*' | |
pull_request: | |
# Needed to login to DockerHub | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
release: | |
if: github.repository == 'grafana/tempo' # skip in forks | |
runs-on: ubuntu-24.04 | |
env: | |
NFPM_SIGNING_KEY_FILE: /tmp/nfpm-private-key.key | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: docker | |
run: | | |
podman run -itd --name systemd-debian --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro jrei/systemd-debian:12 | |
podman exec systemd-debian ls | |
- name: fetch tags | |
run: git fetch --tags | |
- id: "get-secrets" | |
name: "get nfpm signing keys" | |
uses: "grafana/shared-workflows/actions/get-vault-secrets@main" | |
with: | |
common_secrets: | | |
NFPM_SIGNING_KEY=packages-gpg:private-key | |
NFPM_DEFAULT_PASSPHRASE=packages-gpg:passphrase | |
- name: write-key | |
run: printf "%s" "$NFPM_SIGNING_KEY" > $NFPM_SIGNING_KEY_FILE | |
- name: test release | |
run: make release-snapshot | |
- name: test deb package | |
run: | | |
docker run -d --name systemd-debian --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro jrei/systemd-debian:12 | |
docker cp ./dist/tempo_*_linux_amd64.deb systemd-debian:. | |
docker cp ./tools/packaging/verify-deb-install.sh systemd-debian:. | |
docker exec systemd-debian ./verify-deb-install.sh | |
docker rm -f systemd-debian | |
- name: test rpm package | |
run: | | |
docker run -d --name systemd-centos --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro jrei/systemd-centos:8 | |
docker cp ./dist/tempo_*_linux_amd64.rpm systemd-centos:. | |
docker cp ./tools/packaging/verify-rpm-install.sh systemd-centos:. | |
docker exec systemd-centos ./verify-rpm-install.sh | |
- name: release | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
run: make release |