Skip to content

Commit

Permalink
Merge pull request #17 from anderseknert/bump-versions
Browse files Browse the repository at this point in the history
Bump versions
  • Loading branch information
anderseknert authored Sep 21, 2022
2 parents f48d849 + 5931fdf commit bd80f8f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
2 changes: 1 addition & 1 deletion .github/workflows/test_setup_opa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
version: ["<0.34", "0.34.1", "latest", "edge"]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup opa
uses: ./
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify_dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- run: npm install

Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@

GitHub action to configure the [Open Policy Agent CLI](https://www.openpolicyagent.org/docs/latest/cli/) in your GitHub Actions workflow.

[Open Policy Agent (OPA)](https://github.com/open-policy-agent/opa) is an open source, general-purpose policy engine.
[Open Policy Agent (OPA)](https://github.com/open-policy-agent/opa) is an open source, general-purpose policy engine.

## Running tests

This GitHub Action works great to run any [tests](https://www.openpolicyagent.org/docs/latest/policy-testing/) you have included with your Rego files.

## Basic Usage

Here we see a simple template that checks out the repository code, installs the latest OPA, and then runs all of the Rego files in the `tests` directory.
Here we see a simple template that checks out the repository code, installs the latest OPA, and then runs all of the Rego files in the `tests` directory.

```yml
name: Run OPA Tests
name: Run OPA Tests
on: [push]
jobs:
Run-OPA-Tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup OPA
uses: open-policy-agent/setup-opa@v1
with:
version: latest

- name: Run OPA Tests
- name: Run OPA Tests
run: opa test tests/*.rego -v
```
Expand All @@ -40,7 +40,7 @@ steps:
- name: Setup OPA
uses: open-policy-agent/setup-opa@v1
with:
version: 0.34.1
version: 0.44.0
```
Or, OPA can be locked to a [SemVer range](https://www.npmjs.com/package/semver#ranges).
Expand All @@ -50,23 +50,23 @@ steps:
- name: Setup OPA
uses: open-policy-agent/setup-opa@v1
with:
version: 0.34.x
version: 0.44.x
```
```yml
steps:
- name: Setup OPA
uses: open-policy-agent/setup-opa@v1
with:
version: 0.34
version: 0.44
```
```yml
steps:
- name: Setup OPA
uses: open-policy-agent/setup-opa@v1
with:
version: <0.34
version: <0.44
```
You may also use the `latest` or `edge` version.
Expand All @@ -92,7 +92,7 @@ You can also choose to run your tests against multiple versions of OPA.
```yml
strategy:
matrix:
version: [latest, 0.38.x, 0.37.x]
version: [latest, 0.44.x, 0.43.x]
steps:
- name: Setup OPA
uses: open-policy-agent/setup-opa@v1
Expand All @@ -104,15 +104,15 @@ steps:

The action supports the following inputs:

- `version`: Optional, defaults to `latest`. `latest`, `edge`, and [SemVer ranges](https://www.npmjs.com/package/semver#ranges) are supported, so instead of a [full version](https://github.com/open-policy-agent/opa/releases) string, you can use `0.35`. This enables you to automatically get the latest backward compatible changes in the v0.35 release.
- `version`: Optional, defaults to `latest`. `latest`, `edge`, and [SemVer ranges](https://www.npmjs.com/package/semver#ranges) are supported, so instead of a [full version](https://github.com/open-policy-agent/opa/releases) string, you can use `0.44`. This enables you to automatically get the latest backward compatible changes in the v0.44 release.

## Outputs

This action does not set any direct outputs.

## Credits

Thanks to the folks over at [Infracost](https://github.com/infracost/infracost) who created the initial version of this repository.
Thanks to the folks over at [Infracost](https://github.com/infracost/infracost) who created the initial version of this repository.

## Contributions
Contributions are welcome! See [Contributor's Guide](https://www.openpolicyagent.org/docs/latest/contributing/)
Expand Down

0 comments on commit bd80f8f

Please sign in to comment.