commit c387d0845ef2447055d0bf7148a12684a8142f18 Author: Roger Sikorski Date: Wed Jul 26 07:40:08 2023 +0200 first commit added diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml new file mode 100644 index 0000000..7fa6e49 --- /dev/null +++ b/.gitea/workflows/main.yml @@ -0,0 +1,27 @@ +on: + push: + branches: + - main + +env: + # https://github.com/hadolint/hadolint/releases + HADOLINT_VERSION: "2.12.0" + +jobs: + build: + runs-on: docker + steps: + - uses: actions/checkout@v3 + - name: Pull Docker Image for caching + run: docker pull registry.sikorski.cloud/rogersik/hadolint:latest || exit 0 + - name: Build docker image + run: | + docker build . \ + --cache-from registry.sikorski.cloud/rogersik/hadolint:latest \ + --file Dockerfile \ + --tag registry.sikorski.cloud/rogersik/hadolint:$HADOLINT_VERSION + --tag registry.sikorski.cloud/rogersik/hadolint:"2" + --tag registry.sikorski.cloud/rogersik/hadolint:"2.12" + --tag registry.sikorski.cloud/rogersik/hadolint:latest + - name: Push docker image + run: docker push registry.sikorski.cloud/rogersik/hadolint --all-tags \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fc67127 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +# https://endoflife.date/alpine +FROM alpine:3.18 + + +RUN wget -nv https://github.com/hadolint/hadolint/releases/download/v${HADOLINT_VERSION}/hadolint-Linux-x86_64 -O /usr/local/bin/hadolint \ + && chmod +x /usr/local/bin/hadolint \ No newline at end of file