Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
410d0bc1
Unverified
Commit
410d0bc1
authored
Aug 21, 2020
by
Pedro Lamas
Browse files
Updates following PR comments
parents
67360e93
abc62b93
Changes
1
Hide whitespace changes
Inline
Side-by-side
.github/workflows/dockerhub.yml
View file @
410d0bc1
...
...
@@ -2,7 +2,11 @@
name
:
Build DockerHub
on
:
push
:
branches
:
[
master
,
dev
]
branches
:
-
master
-
dev
tags
:
-
'
*'
jobs
:
build
:
...
...
@@ -12,23 +16,34 @@ jobs:
uses
:
actions/checkout@v2
-
name
:
install buildx
id
:
buildx
uses
:
crazy-max/ghaction-docker-buildx@v
1
uses
:
crazy-max/ghaction-docker-buildx@v
3
with
:
version
:
latest
buildx-version
:
latest
qemu-version
:
latest
-
name
:
login to docker hub
run
:
|
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
-
name
:
build and push the image (master branch)
run
:
|
docker buildx build \
--push \
--tag neilpang/acme.sh:latest \
--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)
-
name
:
build and push the image
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 \
--push \
--tag neilpang/acme.sh:dev \
--tag ${DOCKER_IMAGE}:${BRANCH_TAG} \
--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 .
if
:
${{ github.ref == 'refs/heads/dev' }}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment