Skip to content

Commit

Permalink
ci: fix env
Browse files Browse the repository at this point in the history
  • Loading branch information
ParzivalEugene committed Aug 26, 2024
1 parent cb7a80c commit 676d3a2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -53,4 +53,4 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
6 changes: 4 additions & 2 deletions actions/getSocialInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const getGithubInfo = async (): Promise<GetGithubInfo | undefined> => {
}`,
}),
headers: {
Authorization: `Bearer ${env.GITHUB_TOKEN}`,
Authorization: `Bearer ${env.GH_TOKEN}`,
},
next: {
revalidate: 60,
Expand All @@ -52,7 +52,9 @@ export const getGithubInfo = async (): Promise<GetGithubInfo | undefined> => {
};
};

export const getLeetcodeInfo = async (): Promise<GetLeetcodeInfo | undefined> => {
export const getLeetcodeInfo = async (): Promise<
GetLeetcodeInfo | undefined
> => {
const res = await fetch(
"https://leetcode-stats-api.herokuapp.com/ParzivalEugene",
{
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
});

0 comments on commit 676d3a2

Please sign in to comment.