-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #170 from permitio/omer/per-10669-adapt-pdp-ci-to-…
…autouse-the-go-service omer/per-10669-adapt-pdp-ci-to-autouse-the-go-service
- Loading branch information
Showing
11 changed files
with
120 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Build and Push PDP Docker Image Manually | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
required: true | ||
description: 'The tag for the image' | ||
type: string | ||
|
||
jobs: | ||
build-and-push-pdp: | ||
runs-on: ubuntu-latest | ||
env: | ||
IMAGE_TAG: ${{ inputs.tag }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
repository: permitio/permit-opa | ||
ref: main | ||
path: './permit-opa' | ||
token: ${{ secrets.CLONE_REPO_TOKEN }} | ||
|
||
- name: Pre build PDP | ||
run: | | ||
echo "${IMAGE_TAG}" | cut -d '-' -f 1 > permit_pdp_version | ||
rm -rf custom | ||
mkdir custom | ||
build_root="$PWD" | ||
cd ./permit-opa | ||
find * -name '*go*' -print0 | xargs -0 tar -czf "$build_root"/custom/custom_opa.tar.gz --exclude '.*' | ||
if [[ "${IMAGE_TAG}" != *alpha* ]]; then | ||
echo "Alpha version not detected, exiting..." | ||
exit 1 | ||
fi | ||
- uses: robinraju/release-downloader@v1 | ||
with: | ||
repository: permitio/datasync | ||
latest: true | ||
fileName: factstore_server* | ||
token: ${{ secrets.CLONE_REPO_TOKEN }} | ||
out-file-path: "factstore_server" | ||
|
||
- name: Build and push PDP image - (pre-release) | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
tags: permitio/pdp-v2:${{ inputs.tag }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters