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

28 lines
947 B
YAML
Raw Normal View History

2023-07-26 07:40:08 +02:00
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
2023-07-26 07:45:47 +02:00
run: docker pull gitea.sikorski.cloud/rogersik/hadolint:latest || exit 0
2023-07-26 07:40:08 +02:00
- name: Build docker image
run: |
docker build . \
2023-07-26 07:45:47 +02:00
--cache-from gitea.sikorski.cloud/rogersik/hadolint:latest \
2023-07-26 07:40:08 +02:00
--file Dockerfile \
2023-07-26 07:44:37 +02:00
--build-arg HADOLINT_VERSION=$HADOLINT_VERSION \
2023-07-26 07:45:47 +02:00
--tag gitea.sikorski.cloud/rogersik/hadolint:$HADOLINT_VERSION \
--tag gitea.sikorski.cloud/rogersik/hadolint:"2" \
--tag gitea.sikorski.cloud/rogersik/hadolint:"2.12" \
--tag gitea.sikorski.cloud/rogersik/hadolint:latest
2023-07-26 07:40:08 +02:00
- name: Push docker image
2023-07-26 07:45:47 +02:00
run: docker push gitea.sikorski.cloud/rogersik/hadolint --all-tags