Skip to content

Commit

Permalink
final
Browse files Browse the repository at this point in the history
  • Loading branch information
EliMoshkovich committed Mar 28, 2024
1 parent 53521de commit fb6e445
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 28 deletions.
39 changes: 13 additions & 26 deletions .github/workflows/pdp_cicd.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Build and Push PDP Docker Image
on: push
# release:
# types: [published]

on:
release:
types: [published]

jobs:
build-and-push-pdp-vanilla:
runs-on: ubuntu-latest
Expand All @@ -28,7 +30,7 @@ jobs:
if: "!github.event.release.prerelease"
uses: docker/build-push-action@v5
with:
push: false
push: true
context: .
platforms: linux/amd64,linux/arm64
tags: permitio/pdp-v2-vanilla:${{ github.event.release.tag_name }}, permitio/pdp-v2-vanilla:latest
Expand All @@ -39,7 +41,7 @@ jobs:
if: "github.event.release.prerelease"
uses: docker/build-push-action@v5
with:
push: false
push: true
context: .
platforms: linux/amd64,linux/arm64
tags: permitio/pdp-v2-vanilla:${{ github.event.release.tag_name }}
Expand Down Expand Up @@ -83,35 +85,20 @@ jobs:
if: "github.event.release.prerelease"
uses: docker/build-push-action@v5
with:
push: false
push: true
context: .
#platforms: linux/amd64,linux/arm64
platforms: linux/amd64
#tags: permitio/pdp-v2:${{ github.event.release.tag_name }}
tags: permitio/pdp-v2:0.3.0-rc.1
load: true
platforms: linux/amd64,linux/arm64
tags: permitio/pdp-v2:${{ github.event.release.tag_name }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build and push PDP image - (official release)
if: "!github.event.release.prerelease"
uses: docker/build-push-action@v5
with:
push: false
push: true
context: .
#platforms: linux/amd64,linux/arm64
platforms: linux/amd64
#tags: permitio/pdp-v2:${{ github.event.release.tag_name }},permitio/pdp-v2:latest
tags: permitio/pdp-v2:0.3.0-rc.1
load: true
platforms: linux/amd64,linux/arm64
tags: permitio/pdp-v2:${{ github.event.release.tag_name }},permitio/pdp-v2:latest
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Install Docker
uses: docker-practice/actions-setup-docker@master

- name: local PDP runnning
#env:
# PDP_API_KEY: ${{ secrets.PDP_API_KEY }}
# PERMIT_API_KEY: ${{ secrets.PDP_API_KEY }}
run: docker run -p 7766:7000 --env PDP_API_KEY=permit_key_Hqeh8UrI1WpAwQJZGqkROkf5spS9b83Yk0z4YcSidhzEf4TTeE4ldKnIYQsfO7RM6vFml8nMinuVfeLEBn6SU3 --env PDP_DEBUG=true permitio/pdp-v2:0.3.0-rc.1
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ logzio-python-handler
ddtrace
protobuf>=3.20.2 # not directly required, pinned by Snyk to avoid a vulnerability
opal-client @ git+https://github.com/permitio/opal.git@master#subdirectory=packages/opal-client


0 comments on commit fb6e445

Please sign in to comment.