Add GitHub repository to .env and compose file

This commit is contained in:
Max Schmidt 2023-06-15 15:36:50 +02:00
parent 769bf80ca7
commit 4b7f1a7c82
3 changed files with 6 additions and 1 deletions

View File

@ -56,6 +56,9 @@ jobs:
replace_env 'MONGODB_PW' '${{ secrets.MONGODB_PW }}'
replace_env 'TOKEN' '${{ secrets.TOKEN }}'
# Append GitHub repository to .env
echo "REPOSITORY=${{ github.repository }}" >> .env
mkdir -p ./astro
cp .env ./astro/.env

View File

@ -35,6 +35,8 @@ services:
target: prod
volumes:
- ./data/media:/prod/dist/media
environment:
- REPOSITORY=${REPOSITORY}
labels:
- traefik.enable=true
- traefik.http.routers.${NAME}-payload.rule=Host(`${PAYLOAD_HOST}`)

View File

@ -18,7 +18,7 @@ const Posts: CollectionConfig = {
try {
console.log(
await fetch(
`https://api.github.com/repos/mooxl/${process.env.NAME}/dispatches`,
`https://api.github.com/repos/${process.env.REPOSITORY}/dispatches`,
{
method: "POST",
headers: {