From 1685dea1ac633029508863828775b3b2a9a37f1c Mon Sep 17 00:00:00 2001 From: Ilir Bekteshi Date: Fri, 28 Feb 2020 10:14:09 +0100 Subject: [PATCH] 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. --- .gitattributes | 2 ++ .github/workflows/release.yml | 13 +++++++++++++ Dockerfile | 2 +- README.md | 6 +++--- action.yml | 4 ++-- 5 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/workflows/release.yml diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..efdba87 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +* text=auto +*.sh text eol=lf diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..717f113 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index f0d0831..a4d95d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/README.md b/README.md index ed638dc..9d624fe 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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 ``` diff --git a/action.yml b/action.yml index 4c816a8..5458928 100644 --- a/action.yml +++ b/action.yml @@ -15,7 +15,7 @@ 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 @@ -23,7 +23,7 @@ inputs: runs: using: 'docker' - image: 'docker://ilirbekteshi/action-yamllint' + image: 'Dockerfile' args: - ${{ inputs.file_or_dir }} - ${{ inputs.config_file }}