Merge pull request #149 from itfactory-tm/dependabot/go_modules/golan… #254
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 Deploy Alf | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install buildx | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y binfmt-support qemu-user-static jq | |
mkdir -p ~/.docker/cli-plugins | |
BUILDX_URL=$(curl https://api.github.com/repos/docker/buildx/releases/latest | jq -r .assets[].browser_download_url | grep amd64 | grep linux) | |
wget $BUILDX_URL -O ~/.docker/cli-plugins/docker-buildx | |
chmod +x ~/.docker/cli-plugins/docker-buildx | |
docker buildx create --name xbuilder | |
docker buildx use xbuilder | |
docker buildx inspect --bootstrap | |
- name: Log in to registry | |
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login registry.dispatch.sh -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | |
- name: Build the Docker image | |
run: docker buildx build . --file Dockerfile.alf --tag registry.dispatch.sh/maartje/thomas-bot-alf:$GITHUB_SHA --push --platform "linux/amd64,linux/arm64,linux/arm" | |