generated from getsentry/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 59
Closed
Description
Github Sentry Action Release Bug Report
Error message since yesterday when running this action code:
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: "class-manager"
SENTRY_PROJECT: "classmanager-frontend"
with:
environment: ${{ env.VITE_CURRENT_ENV }}
version: ${{ github.ref }}
dist: ${{ github.ref }}
sourcemaps: "./web/dist/assets"
Apologies for the quality of this report - I'm not a devops person, I'm using this existing workflow action that's been in place since November 2024 that just stopped working. I've tracked it down to the release of 1.10.4 that's changed something.
Environment
v1.10.4
Running on self-hosted runner, x64 Ubuntu 22
Steps to Reproduce
We did nothing - action runner is running v1 (latest) so automatically started using 1.10.4 when that released, since then we have this error.
When specifying the precise version of previous release (v1.10.3) all works fine.
Expected Result
Before yesterday output:
Run getsentry/action-release@v1
Run volta-cli/action@v4
looking up latest volta version
Determine the latest volta version
using cached volta@2.0.2
adding /root/actions-runner/_work/_tool/volta/2.0.2/x64/bin to $PATH
... lots of other success logging and messaging
Actual Result
Yesterday onwards output:
Run getsentry/action-release@v1
Run git config --global --add safe.directory /root/actions-runner/_work/classmanager-frontend/classmanager-frontend
fatal: $HOME not set
Further information
Here's my complete workflow action file:
name: Web Deploy
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+-dev.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-stage.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
deploy:
runs-on: self-hosted
env:
CLASSMANAGER_NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Cache node_modules
uses: actions/cache@v4
with:
path: |
./node_modules
./web/node_modules
./mobile/node_modules
./shared/node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
run: npm install
- name: Get Release Time
id: get_release_time
run: |
RELEASED_AT=$(TZ="Europe/London" date +"%Y-%m-%d %H:%M:%S")
echo "RELEASED_AT=$RELEASED_AT" >> $GITHUB_ENV
echo "::set-output name=released_at::$RELEASED_AT"
- name: Check Tag and Set environment
id: set_env
run: |
TAG_NAME="${{ github.ref }}"
if [[ $TAG_NAME =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+-stage\.[0-9]+$ ]]; then
echo "Setting VITE_CURRENT_ENV to stage"
echo "VITE_CURRENT_ENV=stage" >> $GITHUB_ENV
elif [[ $TAG_NAME =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Setting VITE_CURRENT_ENV to main"
echo "VITE_CURRENT_ENV=main" >> $GITHUB_ENV
elif [[ $TAG_NAME =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+-dev\.[0-9]+$ ]]; then
echo "Setting VITE_CURRENT_ENV to dev"
echo "VITE_CURRENT_ENV=dev" >> $GITHUB_ENV
else
echo "Invalid tag format"
exit 1
fi
- name: Build Application
env:
VITE_APP_VERSION: ${{ github.ref_name }}
VITE_RELEASED_AT: ${{ steps.get_release_time.outputs.released_at }}
run: |
cd web && npx vite build
- name: Move Build Assets
run: cp support/web/infrastructure/build/* dist
- name: Deploy
run: |
echo "Deploying code to ${{ env.VITE_CURRENT_ENV }} environment"
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: classmanager
directory: web/dist
branch: ${{ env.VITE_CURRENT_ENV }}
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: "class-manager"
SENTRY_PROJECT: "classmanager-frontend"
with:
environment: ${{ env.VITE_CURRENT_ENV }}
version: ${{ github.ref }}
dist: ${{ github.ref }}
sourcemaps: "./web/dist/assets"
Metadata
Metadata
Assignees
Labels
No labels