Skip to content

Commit

Permalink
add readme and gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
rez0n committed Nov 4, 2020
1 parent 61fabd1 commit b9db727
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker-compose.yml
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# GitHub Actions: Get Github release
This Action able to get latest release version (tag) of the remote repository.

## Configuration

### Inputs

Name | Description | Example
--- | --- | ---
repository | The Github owner/repository | `nodejs/node`
type | The release type (prerelease or stable) | `stable`
token | Github auth token (default variable for each aciton session) | `${{ secrets.GITHUB_TOKEN }}`

#### Possible values for `type` input
* *stable* - Get the stable `latest` release
* *prerelease* - Get the latest `prerelease`
* *latest* - Get the *really* latest release with no matter is it stable or prerelease

### Outputs
Action outputs variable `release` with tag name of release.

## Usage example

```
on:
push:
branches: [ main ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name:
uses: rez0n/actions-github-release@main
id: node_release
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: "nodejs/node"
type: "stable"
- name: Build image
uses: docker/build-push-action@v1
with:
...
dockerfile: Dockerfile
tags: latest, ${{ steps.node_release.outputs.release }}
```

0 comments on commit b9db727

Please sign in to comment.