diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b62fd0..934a609 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,9 +22,9 @@ jobs: - name: Set ghcr.io url run: | echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}" - echo "SPOTIFY_CLIENT_ID=${{ secrets.SPOTIFY_CLIENT_ID }}" >> "${GITHUB_ENV}" - echo "SPOTIFY_CLIENT_SECRET=${{ secrets.SPOTIFY_CLIENT_SECRET }}" >> "${GITHUB_ENV}" - echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "${GITHUB_ENV}" + echo "SPOTIFY_CLIENT_ID=${{ secrets.SPOTIFY_CLIENT_ID }}" >> .env + echo "SPOTIFY_CLIENT_SECRET=${{ secrets.SPOTIFY_CLIENT_SECRET }}" >> .env + echo "GH_TOKEN=${{ secrets.GH_TOKEN }}" >> .env - name: Docker meta id: meta @@ -53,4 +53,4 @@ jobs: - name: Release uses: softprops/action-gh-release@v2 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/actions/getSocialInfo.ts b/actions/getSocialInfo.ts index 81fe06f..4bf17b0 100644 --- a/actions/getSocialInfo.ts +++ b/actions/getSocialInfo.ts @@ -30,7 +30,7 @@ export const getGithubInfo = async (): Promise => { }`, }), headers: { - Authorization: `Bearer ${env.GITHUB_TOKEN}`, + Authorization: `Bearer ${env.GH_TOKEN}`, }, next: { revalidate: 60, @@ -52,7 +52,9 @@ export const getGithubInfo = async (): Promise => { }; }; -export const getLeetcodeInfo = async (): Promise => { +export const getLeetcodeInfo = async (): Promise< + GetLeetcodeInfo | undefined +> => { const res = await fetch( "https://leetcode-stats-api.herokuapp.com/ParzivalEugene", { diff --git a/docker-compose.yml b/docker-compose.yml index 0a624c1..2ab5349 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,4 +9,4 @@ services: environment: - SPOTIFY_CLIENT_ID=${SPOTIFY_CLIENT_ID} - SPOTIFY_CLIENT_SECRET=${SPOTIFY_CLIENT_SECRET} - - GITHUB_TOKEN=${GITHUB_TOKEN} + - GH_TOKEN=${GH_TOKEN} diff --git a/env.ts b/env.ts index a19c8f7..308ed43 100644 --- a/env.ts +++ b/env.ts @@ -5,7 +5,7 @@ export const env = createEnv({ server: { SPOTIFY_CLIENT_ID: z.string(), SPOTIFY_CLIENT_SECRET: z.string(), - GITHUB_TOKEN: z.string(), + GH_TOKEN: z.string(), }, experimental__runtimeEnv: {}, });