Skip to content

docker-buildimage-stunnel #21

docker-buildimage-stunnel

docker-buildimage-stunnel #21

name: docker-buildimage-stunnel
on:
schedule:
- cron: '0 4 1 * *'
push:
branches: [ main ]
paths:
- 'docker/stunnel/**'
- '.github/workflows/docker-buildimage-stunnel.yml'
jobs:
build-image:
runs-on: ubuntu-latest
steps:
-
name: Checkout
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_USER }}
password: ${{ secrets.DOCKERHUB_PASSWD }}
-
name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
-
name: Set build date
id: build-date
run: |
echo "ym=$(date +%Y-%m)" >> $GITHUB_OUTPUT
echo "date=$(date +%F)" >> $GITHUB_OUTPUT
-
name: Build and push
uses: docker/build-push-action@v3
with:
context: docker/stunnel/
file: docker/stunnel/Dockerfile
platforms: linux/amd64,linux/386,linux/arm64/v8,linux/arm/v7,linux/arm/v6
push: true
tags: |
docker.io/gsmlg/stunnel:${{ steps.build-date.outputs.ym }}
ghcr.io/gsmlg/stunnel:${{ steps.build-date.outputs.ym }}
docker.io/gsmlg/stunnel:latest
ghcr.io/gsmlg/stunnel:latest