remove microbadger from build workflow
This commit is contained in:
parent
3bd0027a3e
commit
3d3d6b0b81
1 changed files with 12 additions and 14 deletions
26
.github/workflows/docker-build.yml
vendored
26
.github/workflows/docker-build.yml
vendored
|
@ -1,24 +1,26 @@
|
||||||
name: docker build
|
name: docker build
|
||||||
|
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
env:
|
env:
|
||||||
USERNAME: maksimstojkovic
|
USERNAME: maksimstojkovic
|
||||||
PROJECT: letsencrypt
|
PROJECT: letsencrypt
|
||||||
PLATFORMS: linux/amd64,linux/arm/v7,linux/arm64
|
PLATFORMS: linux/arm/v7,linux/arm64,linux/amd64
|
||||||
MB_HOOK: https://hooks.microbadger.com/images/silentdigit/letsencrypt/_6yxWTBCiLrWUo_G3PCewhwxrVo=
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildx:
|
buildx:
|
||||||
name: Build Multi-Platform Image and Upload to Docker Hub
|
name: Build Multi-Platform Image and Upload to Docker Hub
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout Repo
|
||||||
name: Checkout Repo
|
uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v1
|
with:
|
||||||
|
ref: 'main'
|
||||||
|
|
||||||
-
|
- name: Setup Docker Buildx
|
||||||
name: Setup Docker Buildx
|
|
||||||
run: |
|
run: |
|
||||||
# Build docker buildx from source
|
# Build docker buildx from source
|
||||||
export DOCKER_BUILDKIT=1
|
export DOCKER_BUILDKIT=1
|
||||||
|
@ -37,8 +39,7 @@ jobs:
|
||||||
docker buildx create --name builder --driver docker-container --use
|
docker buildx create --name builder --driver docker-container --use
|
||||||
docker buildx inspect --bootstrap
|
docker buildx inspect --bootstrap
|
||||||
|
|
||||||
-
|
- name: Build and Push
|
||||||
name: Build and Push
|
|
||||||
env:
|
env:
|
||||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
|
@ -46,7 +47,7 @@ jobs:
|
||||||
docker login -u "$USERNAME" -p "$DOCKER_TOKEN"
|
docker login -u "$USERNAME" -p "$DOCKER_TOKEN"
|
||||||
|
|
||||||
# Setup build parameters
|
# Setup build parameters
|
||||||
BUILD_PARAMS="--platform="$PLATFORMS" --build-arg VCS_REF=$(git rev-parse --short HEAD) --push"
|
BUILD_PARAMS="--platform="$PLATFORMS" --push"
|
||||||
|
|
||||||
# Build image as tagged version
|
# Build image as tagged version
|
||||||
TAG=$(date +%y.%m)
|
TAG=$(date +%y.%m)
|
||||||
|
@ -55,6 +56,3 @@ jobs:
|
||||||
# Build image as latest version
|
# Build image as latest version
|
||||||
TAG=latest
|
TAG=latest
|
||||||
docker buildx build -t "$USERNAME"/"$PROJECT":"$TAG" $BUILD_PARAMS .
|
docker buildx build -t "$USERNAME"/"$PROJECT":"$TAG" $BUILD_PARAMS .
|
||||||
|
|
||||||
# Update MicroBadger metadata
|
|
||||||
curl -X POST "$MB_HOOK"
|
|
||||||
|
|
Loading…
Reference in a new issue