This repository has been archived on 2023-08-22. You can view files and clone it, but cannot push or open issues or pull requests.
docker-hadolint/.gitea/workflows/main.yml
Roger Sikorski ed35ab439c
All checks were successful
/ build (push) Successful in 2s
automated version tag setup
2023-07-26 07:52:14 +02:00

27 lines
985 B
YAML

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 gitea.sikorski.cloud/rogersik/hadolint:latest || exit 0
- name: Build docker image
run: |
docker build . \
--cache-from gitea.sikorski.cloud/rogersik/hadolint:latest \
--file Dockerfile \
--build-arg HADOLINT_VERSION=$HADOLINT_VERSION \
--tag gitea.sikorski.cloud/rogersik/hadolint:$HADOLINT_VERSION \
--tag gitea.sikorski.cloud/rogersik/hadolint:${HADOLINT_VERSION%.*.*} \
--tag gitea.sikorski.cloud/rogersik/hadolint:"${HADOLINT_VERSION%.*}" \
--tag gitea.sikorski.cloud/rogersik/hadolint:latest
- name: Push docker image
run: docker push gitea.sikorski.cloud/rogersik/hadolint --all-tags