From 51543f7a7e9dc04632f9d617653301bb8d825fdc Mon Sep 17 00:00:00 2001 From: elimoshkovich Date: Mon, 18 Mar 2024 17:40:45 +0200 Subject: [PATCH] test --- .github/workflows/pdp_cicd.yml | 28 +++++++++++++++++++++++----- Dockerfile | 2 +- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pdp_cicd.yml b/.github/workflows/pdp_cicd.yml index 1622ed52..4e6bd310 100644 --- a/.github/workflows/pdp_cicd.yml +++ b/.github/workflows/pdp_cicd.yml @@ -1,7 +1,7 @@ name: Build and Push Docker Image on: push # release: - # types: [published] + # types: [prereleased] jobs: build-and-push: runs-on: ubuntu-latest @@ -20,6 +20,22 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + + - uses: actions/checkout@v3 + with: + repository: permitio/permit-opa + ref: main + token: ${{ secrets.READ_ONLY_GITHUB_TOKEN }} + + - name: Run pre build + working-directory: ./permit-opa + run: | + pwd + #echo "${{ github.event.release.tag_name }}" | cut -d '-' -f 1 > permit_pdp_version + echo "0.2.38" > permit_pdp_version + rm -rf custom + mkdir custom + find * -name '*go*' -print0 | xargs -0 tar -czf ./custom/custom_opa.tar.gz --exclude '.*' - name: Build and push Docker image uses: docker/build-push-action@v5 @@ -27,7 +43,9 @@ jobs: push: false context: . platforms: linux/amd64,linux/arm64 - #tags: permitio/pdp:${{ github.event.release.tag_name }} - tags: permitio/pdp:check1 - # cache-from: type=gha - # cache-to: type=gha,mode=max + #tags: permitio/pdp-v2:${{ github.event.release.tag_name }} + tags: permitio/pdp-v2:test + cache-from: type=gha + cache-to: type=gha,mode=max + + diff --git a/Dockerfile b/Dockerfile index b9bf12f9..da7f0171 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ COPY requirements.txt requirements.txt RUN pip install --upgrade pip && pip install setuptools -U && pip install --user -r requirements.txt # Install a custom OPAL, if requested -COPY custom /custom +COPY ./permit-opa/custom /custom RUN if [ -f /custom/custom_opal.tar.gz ]; \ then \