From e17667de795405cdc1fdaa10ed89e74e41fd753f Mon Sep 17 00:00:00 2001 From: Marc 'risson' Schmitt Date: Tue, 12 Sep 2023 13:06:32 +0200 Subject: [PATCH] root: include generated ts client in dev builds Signed-off-by: Marc 'risson' Schmitt --- .dockerignore | 2 ++ .github/workflows/ci-main.yml | 6 ++++++ .github/workflows/release-publish.yml | 3 +++ Dockerfile | 1 + 4 files changed, 12 insertions(+) diff --git a/.dockerignore b/.dockerignore index a96198faf..fc9a08793 100644 --- a/.dockerignore +++ b/.dockerignore @@ -9,3 +9,5 @@ build_docs/** authentik/enterprise blueprints/local .git +!gen-ts-api/node_modules +!gen-ts-api/dist/** diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 7048d40d2..d24a2a88d 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -205,9 +205,12 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: generate ts client + run: make gen-client-ts - name: Build Docker Image uses: docker/build-push-action@v5 with: + context: . secrets: | GEOIPUPDATE_ACCOUNT_ID=${{ secrets.GEOIPUPDATE_ACCOUNT_ID }} GEOIPUPDATE_LICENSE_KEY=${{ secrets.GEOIPUPDATE_LICENSE_KEY }} @@ -252,9 +255,12 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: generate ts client + run: make gen-client-ts - name: Build Docker Image uses: docker/build-push-action@v5 with: + context: . secrets: | GEOIPUPDATE_ACCOUNT_ID=${{ secrets.GEOIPUPDATE_ACCOUNT_ID }} GEOIPUPDATE_LICENSE_KEY=${{ secrets.GEOIPUPDATE_LICENSE_KEY }} diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 2cd6856cc..7860ccac0 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -27,9 +27,12 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: make empty ts client + run: mkdir -p ./gen-ts-client - name: Build Docker Image uses: docker/build-push-action@v5 with: + context: . push: ${{ github.event_name == 'release' }} secrets: | GEOIPUPDATE_ACCOUNT_ID=${{ secrets.GEOIPUPDATE_ACCOUNT_ID }} diff --git a/Dockerfile b/Dockerfile index 5c7017a9b..a6688fbc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,7 @@ RUN --mount=type=bind,target=/work/web/package.json,src=./web/package.json \ COPY ./web /work/web/ COPY ./website /work/website/ +COPY ./gen-ts-api /work/web/node_modules/@goauthentik/api RUN npm run build