This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Simon L <[email protected]>
- Loading branch information
Showing
7 changed files
with
816 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "12:00" | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: "docker" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "12:00" | ||
open-pull-requests-limit: 10 | ||
labels: | ||
- 3. to review | ||
- dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Docker Build and Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tagName: | ||
description: "Tag name" | ||
required: true | ||
default: 'v1' | ||
|
||
jobs: | ||
push_to_registry: | ||
runs-on: ubuntu-latest | ||
|
||
name: Build docker image and push to dockerhub | ||
|
||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build container image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
context: './' | ||
no-cache: true | ||
file: 'Dockerfile' | ||
tags: marcoambrosini/aio-stalwart:${{ github.event.inputs.tagName }} | ||
provenance: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Docker Lint | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
docker-lint: | ||
runs-on: ubuntu-latest | ||
|
||
name: docker-lint | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install hadolint | ||
run: | | ||
sudo wget https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-x86_64 -O /usr/bin/hadolint | ||
sudo chmod +x /usr/bin/hadolint | ||
- name: run lint | ||
run: | | ||
DOCKERFILES="$(find ./ -name Dockerfile)" | ||
mapfile -t DOCKERFILES <<< "$DOCKERFILES" | ||
for file in "${DOCKERFILES[@]}"; do | ||
# DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check | ||
hadolint "$file" --ignore DL4006 | tee -a ./hadolint.log | ||
done | ||
if grep -q "DL[0-9]\+\|SC[0-9]\+" ./hadolint.log; then | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Shellcheck | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '**.sh' | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '**.sh' | ||
|
||
jobs: | ||
shellcheck: | ||
name: Check Shell | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run Shellcheck | ||
uses: ludeeus/[email protected] | ||
with: | ||
check_together: 'yes' | ||
env: | ||
SHELLCHECK_OPTS: --shell bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# From https://github.com/stalwartlabs/mail-server/blob/main/Dockerfile | ||
FROM qstalwartlabs/mail-server | ||
|
||
COPY --chmod=775 start.sh /start.sh | ||
|
||
# hadolint ignore=DL3008 | ||
RUN set -ex; \ | ||
\ | ||
export DEBIAN_FRONTEND=noninteractive; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
netcat-openbsd \ | ||
; \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# hadolint ignore=DL3002 | ||
USER root | ||
ENTRYPOINT [ "/start.sh" ] |
Oops, something went wrong.