hadolint, k3s and kaniko build added #5
@ -6,22 +6,25 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
Dockerfile lint:
|
||||||
runs-on: docker
|
runs-on: k3s
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: docker login
|
- uses: hadolint/hadolint-action@v3.1.0
|
||||||
run: docker login -u $REGISTRY_USER -p $REGISTRY_PASSWORD gitea.sikorski.cloud
|
with:
|
||||||
env:
|
dockerfile: Dockerfile
|
||||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
|
||||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
build:
|
||||||
- name: Pull Docker Image for caching
|
runs-on: k3s
|
||||||
run: docker pull gitea.sikorski.cloud/rogersik/devops-helper:development || exit 0
|
needs: Dockerfile lint
|
||||||
- name: Build docker image
|
steps:
|
||||||
run: |
|
- uses: actions/checkout@v3
|
||||||
docker build . \
|
- name: Kaniko build
|
||||||
--cache-from gitea.sikorski.cloud/rogersik/devops-helper:development \
|
uses: aevea/action-kaniko@master
|
||||||
--file Dockerfile \
|
with:
|
||||||
--tag gitea.sikorski.cloud/rogersik/devops-helper:development
|
image: rogersik/devops-helper
|
||||||
- name: Push docker image
|
registry: gitea.sikorski.cloud
|
||||||
run: docker push gitea.sikorski.cloud/rogersik/devops-helper --all-tags
|
tag: development
|
||||||
|
cache: true
|
||||||
|
username: rogersik
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
@ -7,22 +7,25 @@ on:
|
|||||||
- cron: "0 6 * * SUN"
|
- cron: "0 6 * * SUN"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
Dockerfile lint:
|
||||||
runs-on: docker
|
runs-on: k3s
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: docker login
|
- uses: hadolint/hadolint-action@v3.1.0
|
||||||
run: docker login -u $REGISTRY_USER -p $REGISTRY_PASSWORD gitea.sikorski.cloud
|
with:
|
||||||
env:
|
dockerfile: Dockerfile
|
||||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
|
||||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
build:
|
||||||
- name: Pull Docker Image for caching
|
runs-on: k3s
|
||||||
run: docker pull gitea.sikorski.cloud/rogersik/devops-helper:development || exit 0
|
needs: Dockerfile lint
|
||||||
- name: Build docker image
|
steps:
|
||||||
run: |
|
- uses: actions/checkout@v3
|
||||||
docker build . \
|
- name: Kaniko build
|
||||||
--cache-from gitea.sikorski.cloud/rogersik/devops-helper:development \
|
uses: aevea/action-kaniko@master
|
||||||
--file Dockerfile \
|
with:
|
||||||
--tag gitea.sikorski.cloud/rogersik/devops-helper:latest
|
image: rogersik/devops-helper
|
||||||
- name: Push docker image
|
registry: gitea.sikorski.cloud
|
||||||
run: docker push gitea.sikorski.cloud/rogersik/devops-helper --all-tags
|
tag: latest
|
||||||
|
cache: true
|
||||||
|
username: rogersik
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
3
.hadolint.yaml
Normal file
3
.hadolint.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ignored:
|
||||||
|
- DL3013 # https://github.com/hadolint/hadolint/wiki/DL3013 allow install latest package
|
||||||
|
- DL3018 # https://github.com/hadolint/hadolint/wiki/DL3018 no need to pin specific version
|
@ -1,7 +1,7 @@
|
|||||||
# https://hub.docker.com/_/alpine
|
# https://hub.docker.com/_/alpine
|
||||||
FROM alpine:latest
|
FROM alpine:3.18
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk add --no-cache nano mc micro rsync ncdu git curl
|
apk add --no-cache nano mc micro rsync ncdu git curl
|
||||||
|
|
||||||
ADD ./bin/ /usr/local/bin
|
COPY ./bin/ /usr/local/bin
|
||||||
|
Loading…
Reference in New Issue
Block a user