Skip to content

Commit f08eddd

Browse files
authored
feat(ci): tag GHCR image with release version (#6997)
Similar work with these PRs: - getsentry/relay#4532 - getsentry/symbolicator#1635 While also trying to provide a solution (or at least an alternative) for this issue: getsentry/self-hosted#3593 ### Legal Boilerplate Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
1 parent a4841ad commit f08eddd

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.github/workflows/image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
if [ ${{ github.event_name }} = 'push' ]; then
2626
args+=(
2727
--tag ghcr.io/getsentry/snuba:latest
28+
--tag ghcr.io/getsentry/snuba:nightly
2829
--tag ghcr.io/getsentry/snuba:amd64-latest
2930
--cache-to type=registry,ref=ghcr.io/getsentry/snuba:buildcache,mode=max
3031
--push
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release GHCR Versioned Image
2+
3+
on:
4+
release:
5+
types: [prereleased, released]
6+
7+
jobs:
8+
release-ghcr-version-tag:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Log in to GitHub Container Registry
12+
uses: docker/login-action@v3
13+
with:
14+
registry: ghcr.io
15+
username: ${{ github.actor }}
16+
password: ${{ secrets.GITHUB_TOKEN }}
17+
18+
- name: Tag release version
19+
run: |
20+
docker buildx imagetools create --tag \
21+
ghcr.io/getsentry/snuba:${{ github.ref_name }} \
22+
ghcr.io/getsentry/snuba:${{ github.sha }}

0 commit comments

Comments
 (0)