fix? 3 #101
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: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- 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,linux/arm/v7 | |
push: true | |
tags: | | |
${{ secrets.DOCKER_HUB_USERNAME }}/ddsb:${{ env.TAG }} |