Skip to content

Commit

Permalink
Autotag releases, use Dockerfile (for now) #5
Browse files Browse the repository at this point in the history
Add wf to autotag minor and patch releases
By default use Dockerfile rather than docker image,
obviously is slower by ~15 sec which consumes precious
runner minutes but harder to automate releases, tagging and
updating image reference in action.yaml
thou not impossible. Next time.
  • Loading branch information
ibiqlik committed Feb 28, 2020
1 parent 420199a commit 1685dea
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto
*.sh text eol=lf
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Update Semver
on:
push:
branches-ignore:
- '**'
tags:
- 'v*.*.*'
jobs:
update-semver:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: haya14busa/action-update-semver@v1
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3-alpine

RUN pip install yamllint && \
apk add bash && \
apk add --no-cache bash && \
rm -rf ~/.cache/pip

ADD entrypoint.sh /entrypoint.sh
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This action executes `yamllint` (https://github.com/adrienverge/yamllint) agains
- `file1.yaml`
- `file1.yaml file2.yaml`
- `kustomize/**/*.yaml mychart/*values.yaml`
- `format` - Format for parsing output [parsable,standard,colored,auto]
- `format` - Format for parsing output [parsable,standard,colored,auto] (default: colored)
- `strict` - Return non-zero exit code on warnings as well as errors [true,false]

### Example usage in workflow
Expand All @@ -27,7 +27,7 @@ jobs:
steps:
- uses: actions/checkout@master
- name: yaml-lint
uses: ibiqlik/action-yamllint@master
uses: ibiqlik/action-yamllint@v1
with:
file_or_dir: myfolder/*values*.yaml
config_file: .yamllint.yml
Expand All @@ -42,7 +42,7 @@ jobs:
lintAllTheThings:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v1
- name: yaml-lint
uses: ibiqlik/action-yamllint@master
```
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ inputs:
format:
description: 'Format for parsing output [parsable,standard,colored,auto]'
required: false
default: "auto"
default: "colored"
strict:
description: 'Return non-zero exit code on warnings as well as errors'
required: false
default: "false"

runs:
using: 'docker'
image: 'docker://ilirbekteshi/action-yamllint'
image: 'Dockerfile'
args:
- ${{ inputs.file_or_dir }}
- ${{ inputs.config_file }}
Expand Down

0 comments on commit 1685dea

Please sign in to comment.