hadolint, k3s and kaniko build added #5

Merged
RogerSik merged 4 commits from feature/gitea-actions-update into main 2023-08-22 17:37:36 +02:00
2 changed files with 40 additions and 34 deletions
Showing only changes of commit 3cb770274c - Show all commits

View File

@ -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 }}

View File

@ -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 }}