fix? #105
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: [push] | |
jobs: | |
build-amd64: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Set up Docker BuildX | |
uses: docker/setup-buildx-action@v2 | |
- name: Set push parameter | |
id: setPushParameter | |
run: | | |
if [[ ${{ github.ref }} == 'refs/heads/master' ]]; then | |
echo "TAG=latest" >> $GITHUB_ENV | |
else | |
echo "TAG=dev" >> $GITHUB_ENV | |
fi | |
- name: Build and push | |
env: | |
PUSH: true | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
${{ secrets.DOCKER_HUB_USERNAME }}/ddsb:${{ env.TAG }} | |
build-arm-v7-8: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Set up Docker BuildX | |
uses: docker/setup-buildx-action@v2 | |
- name: Set push parameter | |
id: setPushParameter | |
run: | | |
if [[ ${{ github.ref }} == 'refs/heads/master' ]]; then | |
echo "TAG=latest-arm" >> $GITHUB_ENV | |
else | |
echo "TAG=dev-arm" >> $GITHUB_ENV | |
fi | |
- name: Build and push | |
env: | |
PUSH: true | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/arm/v8,linux/arm/v7 | |
push: true | |
tags: | | |
${{ secrets.DOCKER_HUB_USERNAME }}/ddsb:${{ env.TAG }} | |