38 lines
1,014 B
YAML
Executable file
38 lines
1,014 B
YAML
Executable file
name: Docker Image CI
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
|
|
buildx:
|
|
name: Build Muilti-Platform Image and Upload to Docker Hub
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Checkout Repo
|
|
uses: actions/checkout@v1
|
|
|
|
-
|
|
name: Setup Docker Buildx
|
|
uses: crazy-max/ghaction-docker-buildx@v1
|
|
|
|
-
|
|
name: Available Platforms
|
|
env:
|
|
VERSIONS: ${{ steps.buildx.outputs.platforms }}
|
|
run: echo ${VERSIONS}
|
|
|
|
-
|
|
name: Build and Upload
|
|
env:
|
|
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
|
run: |
|
|
# Variables
|
|
TAG=$(date +%y.%m)
|
|
NAME=silentdigit/letsencrypt
|
|
|
|
# Build image as TAG version
|
|
# docker buildx build -t ${NAME}:${TAG} --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x --push .
|
|
|
|
# Build image as latest version
|
|
docker buildx build -t ${NAME}:latest --platform=linux/arm,linux/arm64,linux/amd64 . --push
|