-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate release pipeline from Drone to GHA
- Loading branch information
1 parent
725f0f5
commit f25ccb1
Showing
3 changed files
with
65 additions
and
222 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
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 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- 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 | ||
env: | ||
NFPM_SIGNING_KEY_FILE: /tmp/nfpm-private-key.key | ||
|
||
- name: test release | ||
run: make release-snapshot | ||
|
||
- name: test deb package | ||
run: | | ||
docker run --name debcontainer -it --detach jrei/systemd-debian:12 /bin/sh | ||
docker cp ./dist/tempo*_amd64.deb debcontainer:. | ||
docker cp ./tools/packaging/wait-for-ready.sh debcontainer:. | ||
docker exec debcontainer dpkg -i ./tempo*_amd64.deb | ||
docker exec debcontainer [ "$(systemctl is-active tempo)" = "active" ] || (echo "tempo is inactive" && exit 1) | ||
docker exec debcontainer apt update && apt install -y curl | ||
docker exec debcontainer ./wait-for-ready.sh) | ||
- name: test rpm package | ||
run: | | ||
docker run --name rpmcontainer -it --detach jrei/systemd-centos:8 /bin/sh | ||
docker cp ./dist/tempo*_amd64.rpm rpmcontainer:. | ||
docker cp ./tools/packaging/wait-for-ready.sh rpmcontainer:. | ||
docker exec rpmcontainer rpm --import https://packages.grafana.com/gpg.key | ||
docker exec rpmcontainer rpm -i ./tempo*_amd64.rpm | ||
docker exec rpmcontainer [ "$(systemctl is-active tempo)" = "active" ] || (echo "tempo is inactive" && exit 1) | ||
docker exec rpmcontainer apt update && apt install -y curl | ||
docker exec rpmcontainer ./wait-for-ready.sh) | ||
- name: release | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
run: make release |