Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
bcomnes committed Nov 17, 2020
1 parent 287efd4 commit a0ec824
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,32 @@ You can also use optional parameters `tagRegex` and `tagRegexGroup` to extract a

<a href="https://github.com/little-core-labs/get-git-tag"><img alt="GitHub Actions status" src="https://github.com/little-core-labs/get-git-tag/workflows/Tests/badge.svg"></a>

Forked from [olegtarasov/get-tag](https://github.com/olegtarasov/get-tag) for maintenance.

## Usage

Dead simple:
### Pre-requisites
Create a workflow `.yml` file in your repositories `.github/workflows` directory. An [example workflow](#example-workflow) is available below. For more information, reference the GitHub Help Documentation for [Creating a workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file).

### Inputs

```yaml
tagRegex:
description: 'Regex to capture a group text as tag name. Full tag string is returned if regex is not defined.'
default: ''
tagRegexGroup:
description: 'Regex group number to return as tag name.'
default: '1'
```
### Outputs
```yaml
tag:
description: The tag name.
```
### Example workflow
```yaml
steps:
Expand All @@ -23,5 +46,26 @@ Dead simple:
- name: Yet another step # Environment variabl usage example
run: |
docker build . --file Dockerfile --tag docker.pkg.github.com/someimage:$GIT_TAG_NAME
```
## FAQ
### Can you offer a major version tag/branch alias? I want automatic updates!
Nope! This was always weird/bad pattern of github actions and I don't have time to maintain or automate that. Luckily github offers a solution for this. Create a `.github/dependabot.yml` with, at a minimum, the following config:

```yaml
# Basic dependabot.yml file with
# minimum configuration for two package managers
version: 2
updates:
# Enable version updates for npm
# Enable updates to github actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
```

Furthermore, this action won't be changing much.

0 comments on commit a0ec824

Please sign in to comment.