Skip to content

2.2.0

2.2.0 #20

Workflow file for this run

name: Docker Release
on:
workflow_dispatch:
release:
types: [ created ]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push to the release tag
run: |
docker buildx build . \
-f docker/Dockerfile \
-t vitodeploy/vito:${{ github.event.release.tag_name }} \
--platform linux/amd64,linux/arm64 \
--no-cache \
--push
- name: Build and push to the 1.x tag
if: startsWith(github.event.release.target_commitish, '1.x')
run: |
docker buildx build . \
-f docker/Dockerfile \
-t vitodeploy/vito:1.x \
--platform linux/amd64,linux/arm64 \
--push
- name: Build and push to the 2.x tag
if: startsWith(github.event.release.target_commitish, '2.x')
run: |
docker buildx build . \
-f docker/Dockerfile \
-t vitodeploy/vito:2.x \
--platform linux/amd64,linux/arm64 \
--push