2020-05-01 17:44:56 +02:00
|
|
|
|
|
|
|
name: Build DockerHub
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master, dev ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-07-23 14:53:53 +02:00
|
|
|
- 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
|
2020-07-24 10:25:58 +02:00
|
|
|
- name: build and push the image (master branch)
|
2020-07-23 14:53:53 +02:00
|
|
|
run: |
|
|
|
|
docker buildx build \
|
|
|
|
--push \
|
|
|
|
--tag neilpang/acme.sh:latest \
|
|
|
|
--platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7,linux/386 .
|
2020-07-24 10:25:58 +02:00
|
|
|
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' }}
|