Skip to content

modularization;

modularization; #317

Workflow file for this run

name: Build and Push
on:
push:
branches: ["main", "develop"]
tags: ["v*.*.*"]
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Determine image tag
id: vars
run: |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
VERSION="${{ github.ref_name }}"
echo "TAGS=ghcr.io/${{ github.repository_owner }}/podnest:latest,ghcr.io/${{ github.repository_owner }}/podnest:${VERSION}" >> $GITHUB_OUTPUT
elif [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "TAGS=ghcr.io/${{ github.repository_owner }}/podnest:develop,ghcr.io/${{ github.repository_owner }}/podnest:dev" >> $GITHUB_OUTPUT
elif [[ "${{ github.ref }}" == "refs/heads/develop" ]]; then
echo "TAGS=ghcr.io/${{ github.repository_owner }}/podnest:beta,ghcr.io/${{ github.repository_owner }}/podnest:${{ github.sha }}" >> $GITHUB_OUTPUT
fi
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.vars.outputs.TAGS }}
build-args: |
VERSION=${{ github.ref_name }}
cache-from: type=gha
cache-to: type=gha,mode=max