Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
EliMoshkovich committed Mar 18, 2024
1 parent 166386b commit 51543f7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/pdp_cicd.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -20,14 +20,32 @@ 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
with:
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


2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 51543f7

Please sign in to comment.