Skip to content

Commit

Permalink
policy-push-action
Browse files Browse the repository at this point in the history
  • Loading branch information
gertd committed Oct 7, 2021
1 parent 7b9bf34 commit 4819de0
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 18 deletions.
17 changes: 2 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,2 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/
.DS_Store
*.log
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"cSpell.words": [
"Aserto",
"datadude",
"entrypoint",
"opcr",
"peoplefinder",
"skip-forward",
"sver"
]
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2021 Aserto Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
82 changes: 80 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,80 @@
# policy-push-action
policy-push-action
# Policy Push Action

## policy-push-action

Push (publish) policy image to registry.


## Inputs

### `tag`

**Required** The image tag to be pushed to the registry.

Default: empty

### `server`

**Required** The registry service hostname.

Default: `opcr.io`

### `verbosity`

**Required** The logging verbosity level [ `info` | `error` | `debug` | `trace` ] used.

Default: `error`


## Outputs

None defined


## Example

```
name: policy-build-release
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
release_policy:
runs-on: ubuntu-latest
name: build
steps:
- uses: actions/checkout@v2
- name: Policy Login
id: policy-login
uses: opcr-io/policy-login-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
username: policy-bot
password: "$GITHUB_TOKEN"
- name: Policy Build
id: policy-build
uses: opcr-io/policy-build-action@v1
with:
src: peoplefinder/src
tag: datadude/peoplefinder:$(sver -n patch)
revision: "$GITHUB_SHA"
- name: Policy Push
id: policy-push
uses: opcr-io/policy-push-action@v1
with:
tag: datadude/peoplefinder:$(sver -n patch)
- name: Policy Logout
id: policy-logout
uses: opcr-io/policy-logout-action@v1
```
22 changes: 22 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Policy Push"
description: "Push policy image to registry"
author: "Aserto Inc."
branding:
icon: skip-forward
color: blue
inputs:
tag:
description: "image tag to be pushed"
required: true
server:
description: "registry service hostname"
required: true
default: "opcr.io"
verbosity:
description: "verbosity level [info|error|debug|trace]"
required: true
default: error
runs:
using: docker
image: 'docker://ghcr.io/opcr-io/policy:latest'
entrypoint: /app/push.sh

0 comments on commit 4819de0

Please sign in to comment.