acme.sh/.github/workflows/dockerhub.yml
2020-07-24 09:25:58 +01:00

35 lines
1.1 KiB
YAML

name: Build DockerHub
on:
push:
branches: [ master, dev ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: install buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
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)
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' }}