Autotag releases, use Dockerfile (for now) #5

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.
This commit is contained in:
Ilir Bekteshi 2020-02-28 10:14:09 +01:00
parent 420199aa6f
commit 1685dea1ac
5 changed files with 21 additions and 6 deletions

2
.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
* text=auto
*.sh text eol=lf

13
.github/workflows/release.yml vendored Normal file
View file

@ -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

View file

@ -1,7 +1,7 @@
FROM python:3-alpine FROM python:3-alpine
RUN pip install yamllint && \ RUN pip install yamllint && \
apk add bash && \ apk add --no-cache bash && \
rm -rf ~/.cache/pip rm -rf ~/.cache/pip
ADD entrypoint.sh /entrypoint.sh ADD entrypoint.sh /entrypoint.sh

View file

@ -13,7 +13,7 @@ This action executes `yamllint` (https://github.com/adrienverge/yamllint) agains
- `file1.yaml` - `file1.yaml`
- `file1.yaml file2.yaml` - `file1.yaml file2.yaml`
- `kustomize/**/*.yaml mychart/*values.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] - `strict` - Return non-zero exit code on warnings as well as errors [true,false]
### Example usage in workflow ### Example usage in workflow
@ -27,7 +27,7 @@ jobs:
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
- name: yaml-lint - name: yaml-lint
uses: ibiqlik/action-yamllint@master uses: ibiqlik/action-yamllint@v1
with: with:
file_or_dir: myfolder/*values*.yaml file_or_dir: myfolder/*values*.yaml
config_file: .yamllint.yml config_file: .yamllint.yml
@ -42,7 +42,7 @@ jobs:
lintAllTheThings: lintAllTheThings:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@v1
- name: yaml-lint - name: yaml-lint
uses: ibiqlik/action-yamllint@master uses: ibiqlik/action-yamllint@master
``` ```

View file

@ -15,7 +15,7 @@ inputs:
format: format:
description: 'Format for parsing output [parsable,standard,colored,auto]' description: 'Format for parsing output [parsable,standard,colored,auto]'
required: false required: false
default: "auto" default: "colored"
strict: strict:
description: 'Return non-zero exit code on warnings as well as errors' description: 'Return non-zero exit code on warnings as well as errors'
required: false required: false
@ -23,7 +23,7 @@ inputs:
runs: runs:
using: 'docker' using: 'docker'
image: 'docker://ilirbekteshi/action-yamllint' image: 'Dockerfile'
args: args:
- ${{ inputs.file_or_dir }} - ${{ inputs.file_or_dir }}
- ${{ inputs.config_file }} - ${{ inputs.config_file }}