mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-27 07:21:53 +00:00
Updates following PR comments
This commit is contained in:
commit
410d0bc125
43
.github/workflows/dockerhub.yml
vendored
43
.github/workflows/dockerhub.yml
vendored
@ -2,7 +2,11 @@
|
|||||||
name: Build DockerHub
|
name: Build DockerHub
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master, dev ]
|
branches:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -12,23 +16,34 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: install buildx
|
- name: install buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: crazy-max/ghaction-docker-buildx@v1
|
uses: crazy-max/ghaction-docker-buildx@v3
|
||||||
with:
|
with:
|
||||||
version: latest
|
buildx-version: latest
|
||||||
|
qemu-version: latest
|
||||||
- name: login to docker hub
|
- name: login to docker hub
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||||
- name: build and push the image (master branch)
|
- name: build and push the image
|
||||||
run: |
|
run: |
|
||||||
|
DOCKER_IMAGE=neilpang/acme.sh
|
||||||
|
|
||||||
|
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||||
|
BRANCH_TAG=${GITHUB_REF#refs/tags/}
|
||||||
|
AUTO_UPGRADE=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $GITHUB_REF == refs/heads/* ]]; then
|
||||||
|
BRANCH_TAG=${GITHUB_REF#refs/heads/}
|
||||||
|
|
||||||
|
if [[ $BRANCH_TAG == master ]]; then
|
||||||
|
BRANCH_TAG=latest
|
||||||
|
AUTO_UPGRADE=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--push \
|
--tag ${DOCKER_IMAGE}:${BRANCH_TAG} \
|
||||||
--tag neilpang/acme.sh:latest \
|
--tag ${DOCKER_IMAGE}:${GITHUB_SHA} \
|
||||||
|
--output "type=image,push=true" \
|
||||||
|
--build-arg AUTO_UPGRADE=${AUTO_UPGRADE} \
|
||||||
--platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7,linux/386 .
|
--platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7,linux/386 .
|
||||||
if: ${{ github.ref == 'refs/heads/master' }}
|
|
||||||
- name: build and push the image (dev branch)
|
|
||||||
run: |
|
|
||||||
docker buildx build \
|
|
||||||
--push \
|
|
||||||
--tag neilpang/acme.sh:dev \
|
|
||||||
--platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7,linux/386 .
|
|
||||||
if: ${{ github.ref == 'refs/heads/dev' }}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user