Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions .github/workflows/pullrequests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "Build & Test"

env:
PLATFORMS: "linux/amd64,linux/arm/v7,linux/arm64" # Build for which platforms
PLATFORMS: "linux/amd64,linux/arm/v7,linux/arm64" # Build for which platforms

on:
pull_request:
Expand All @@ -11,32 +11,28 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4.2.2
-
name: Generate Build-Args
- name: Generate Build-Args
id: build-args
run: |
# echo ::set-output name=build-arg1::"buildarg1"
# echo ::set-output name=build-arg2::"buildarg2"
-
name: Hadolint
- name: Hadolint
uses: brpaz/hadolint-action@v1.5.0
with:
with:
dockerfile: Dockerfile
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.6.0
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
-
name: Build and push
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6.18.0
env:
BUILDKIT_PROGRESS: plain
with:
context: .
file: ./Dockerfile
platforms: ${{ env.PLATFORMS }}
push: false
push: false
80 changes: 35 additions & 45 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ on:
release:
types: [published]
schedule:
- cron: '3 3 * * *'
- cron: "3 3 * * *"
push:
branches:
- 'master'
- 'main'
- "master"
- "main"

env:
PLATFORMS: "linux/amd64,linux/arm64" # Build for which platforms
DOCKER_USER: "tdeutsch" # Which user to use to login to DockerHub
PLATFORMS: "linux/amd64,linux/arm64" # Build for which platforms
DOCKER_USER: "tdeutsch" # Which user to use to login to DockerHub

#####
# To rebuild someone else's repo, do this:
Expand All @@ -32,25 +32,21 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4.2.2
-
name: Generate Build-Args
- name: Generate Build-Args
id: build-args
run: |
# echo ::set-output name=build-arg1::"buildarg1"
# echo ::set-output name=build-arg2::"buildarg2"
-
name: Bump version and push tag if needed
- name: Bump version and push tag if needed
id: tag_version
if: github.event_name == 'push'
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: false
-
name: Create a GitHub release if new version
- name: Create a GitHub release if new version
uses: actions/create-release@v1
if: ${{ steps.tag_version.outputs.new_tag }}
env:
Expand All @@ -59,8 +55,7 @@ jobs:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
-
name: Prepare
- name: Prepare
id: prep
run: |
IMAGENAME=$(echo ${{ github.repository }} | sed 's/${{ github.repository_owner }}\/docker-//g')
Expand Down Expand Up @@ -95,36 +90,32 @@ jobs:
echo ::set-output name=imagename::${IMAGENAME}
echo ::set-output name=version::${VERSION}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
-
name: Hadolint
- name: Hadolint
uses: brpaz/hadolint-action@v1.5.0
with:
with:
dockerfile: Dockerfile
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.6.0
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
-
name: Login to GHCR
- name: Login to GHCR
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Login to Dockerhub
- name: Login to Dockerhub
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
username: ${{ env.DOCKER_USER }}
password: ${{ secrets.DOCKERPASSWORD }}
-
name: Build and push
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6.18.0
env:
BUILDKIT_PROGRESS: plain
with:
context: .
file: ./Dockerfile
Expand All @@ -143,23 +134,22 @@ jobs:
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }}
-
# name: Install latest Skopeo # GitHub's ubuntu 22 uses Skopeo 1.4 but we need newer to fix the "unsupported MIME type for compression: application/vnd.in-toto+json" error
# run: |
# echo 'deb http://download.opensuse.org/repositories/home:/alvistack/xUbuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/home:alvistack.list
# curl -fsSL https://download.opensuse.org/repositories/home:alvistack/xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_alvistack.gpg > /dev/null
# sudo apt update
# sudo apt -o Dpkg::Options::="--force-overwrite" install skopeo
# -
# name: Copy to Docker Hub
# id: copy_images
# run: |
# for i in $(echo ${{ steps.prep.outputs.tags }} | sed "s/,/ /g")
# do
# GHTAG=$(echo $i | sed "s/ghcr.io/docker.io/g" | sed "s/${{ github.repository_owner }}/${{ env.DOCKER_USER }}/g")
# skopeo copy --all --src-creds=${{ github.repository_owner }}:${{ secrets.GITHUB_TOKEN }} --dest-creds=${{ env.DOCKER_USER }}:${{ secrets.DOCKERPASSWORD }} docker://${i} docker://${GHTAG}
# done
# -
- # name: Install latest Skopeo # GitHub's ubuntu 22 uses Skopeo 1.4 but we need newer to fix the "unsupported MIME type for compression: application/vnd.in-toto+json" error
# run: |
# echo 'deb http://download.opensuse.org/repositories/home:/alvistack/xUbuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/home:alvistack.list
# curl -fsSL https://download.opensuse.org/repositories/home:alvistack/xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_alvistack.gpg > /dev/null
# sudo apt update
# sudo apt -o Dpkg::Options::="--force-overwrite" install skopeo
# -
# name: Copy to Docker Hub
# id: copy_images
# run: |
# for i in $(echo ${{ steps.prep.outputs.tags }} | sed "s/,/ /g")
# do
# GHTAG=$(echo $i | sed "s/ghcr.io/docker.io/g" | sed "s/${{ github.repository_owner }}/${{ env.DOCKER_USER }}/g")
# skopeo copy --all --src-creds=${{ github.repository_owner }}:${{ secrets.GITHUB_TOKEN }} --dest-creds=${{ env.DOCKER_USER }}:${{ secrets.DOCKERPASSWORD }} docker://${i} docker://${GHTAG}
# done
# -
name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4.0.2
with:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ RUN chmod +x /scripts/* \
sslscan \
tcpdump \
tcptraceroute \
telnet \
inetutils-telnet \
tmux \
tree \
vim \
Expand Down
Loading