Skip to content

Commit

Permalink
use GITHUB_REF_NAME in main.php for the Sentry 'release' attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Apr 5, 2024
1 parent eff1c2d commit bbb6df4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GITHUB_REF_NAME=${{ GITHUB_REF_NAME }}
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM silintl/php8:8.1

ARG GITHUB_REF_NAME
ENV GITHUB_REF_NAME=$GITHUB_REF_NAME

ENV REFRESHED_AT 2024-02-27

RUN apt-get update -y && \
Expand Down
2 changes: 1 addition & 1 deletion application/common/config/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
'clientOptions' => [
'attach_stacktrace' => false, // stack trace identifies the logger call stack, not helpful
'environment' => YII_ENV,
'release' => 'idp-id-broker@develop',
'release' => 'idp-id-broker@' . Env::get('GITHUB_REF_NAME', 'unknown'),
'max_request_body_size' => 'never', // never send request bodies
'before_send' => function (Event $event) use ($idpName): ?Event {
$event->setExtra(['idp' => $idpName]);
Expand Down

0 comments on commit bbb6df4

Please sign in to comment.