-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Marat Komarov
committed
Mar 18, 2021
1 parent
518ad76
commit 474ca56
Showing
2 changed files
with
20 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM ubuntu:latest | ||
|
||
ENV OPA_VERSION 0.27.1 | ||
RUN apt-get -y update \ | ||
&& apt-get install -y curl \ | ||
&& curl -L -o /usr/bin/opa https://github.com/open-policy-agent/opa/releases/download/v${OPA_VERSION}/opa_linux_amd64 2>/dev/null \ | ||
&& chmod +x /usr/bin/opa \ | ||
&& apt-get -y autoremove && rm -rf /var/lib/apt/lists/* |
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 |
---|---|---|
|
@@ -37,19 +37,19 @@ jobs: | |
test-new-style: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ubuntu:latest # Because it has 'curl' | ||
options: --cpus 1 | ||
# container: | ||
# image: ubuntu:latest # Because it has 'curl' | ||
# options: --cpus 1 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Install OPA | ||
env: | ||
OPA_VERSION: "0.27.1" | ||
run: |- | ||
apt-get -yq update && apt-get install -yq curl; | ||
curl -L -o /usr/bin/opa https://github.com/open-policy-agent/opa/releases/download/v${OPA_VERSION}/opa_linux_amd64 2>/dev/null; | ||
chmod +x /usr/bin/opa; | ||
# - name: Install OPA | ||
# env: | ||
# OPA_VERSION: "0.27.1" | ||
# run: |- | ||
# apt-get -yq update && apt-get install -yq curl; | ||
# curl -L -o /usr/bin/opa https://github.com/open-policy-agent/opa/releases/download/v${OPA_VERSION}/opa_linux_amd64 2>/dev/null; | ||
# chmod +x /usr/bin/opa; | ||
- name: Test | ||
env: | ||
TERM: xterm-256color | ||
|
@@ -64,4 +64,5 @@ jobs: | |
tput sgr0; | ||
opa eval -f pretty --data $pol -i ${pol%.rego}.input.json data.terraform.deny; | ||
done; | ||
done; | ||
done; | ||
uses: ./.github/actions/opa |