Skip to content

Ready for 2.1.0 release #144

Ready for 2.1.0 release

Ready for 2.1.0 release #144

name: Build and Deploy
on:
push:
branches-ignore: ["*"]
tags: ["*"]
jobs:
build:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'AWeber-Imbi/imbi'
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
submodules: true
- name: Extract version from tag
id: version
run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/aweber-imbi/imbi:${{ steps.version.outputs.tag }}
ghcr.io/aweber-imbi/imbi:latest
aweber/imbi:${{ steps.version.outputs.tag }}
aweber/imbi:latest
cache-from: type=gha
cache-to: type=gha,mode=max