Skip to content

change: data volume to disk #46

change: data volume to disk

change: data volume to disk #46

Workflow file for this run

name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches:
- main
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Build:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
# - linux/arm/v7
# container:
# image: catthehacker/ubuntu:act-latest
steps:
-
name: Checkout
uses: actions/checkout@v4 # Checkout the repository code
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3 # (Optional) Setup QEMU if needed
with:
platforms: ${{ matrix.platform }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 # (Optional) Setup Docker Buildx if needed
with:
driver-opts: network=host
# config-inline: |
# [registry."${{ secrets.PRIVATE_DOCKER_REGISTRY_ADDRESS }}"]
# http = true
# insecure = true
# -
# name: Login to gitea container registry
# uses: docker/login-action@v3
# with:
# registry: http://${{ secrets.PRIVATE_DOCKER_REGISTRY_ADDRESS }}
# username: ${{ gitea.actor }}
# password: ${{ secrets.ZXZ_GITEA_CR_PAT }}
#-
# name: Login to GHCR # https://docs.docker.com/build/ci/github-actions/push-multi-registries/
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ secrets.GHCR_IO_USERNAME }}
# password: ${{ secrets.ZXZ_GHCR_IO_PAT }}
-
name: Login to Dockerhub # https://docs.docker.com/build/ci/github-actions/push-multi-registries/
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.ZXZ_DOCKERHUB_PAT }}
-
name: Declare some variables
shell: bash
run: |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> "$GITHUB_ENV"
echo "repository_name=$(basename `git rev-parse --show-toplevel`)" >> "$GITHUB_ENV"
echo "platform=$(echo ${{ matrix.platform }} | tr -d '/' | tr -d 'linux')" >> "$GITHUB_ENV"
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: . # Docker context (path to Dockerfile and build context)
platforms: ${{ matrix.platform }}
file: ./Dockerfile # Path to Dockerfile (if not in the root)
push: true # Push the built image to a registry # ${{ github.event_name != 'pull_request' }}
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.repository_name }}:${{ env.branch }}-${{ env.sha_short }}-${{ env.platform }}
Create_manifest:
runs-on: ubuntu-latest
timeout-minutes: 60
needs: [Build]
steps:
-
name: Checkout
uses: actions/checkout@v4 # Checkout the repository code
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 # (Optional) Setup Docker Buildx if needed
with:
driver-opts: network=host
#-
# name: Login to GHCR # https://docs.docker.com/build/ci/github-actions/push-multi-registries/
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ secrets.GHCR_IO_USERNAME }}
# password: ${{ secrets.ZXZ_GHCR_IO_PAT }}
-
name: Login to Dockerhub # https://docs.docker.com/build/ci/github-actions/push-multi-registries/
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.ZXZ_DOCKERHUB_PAT }}
-
name: Declare some variables
shell: bash
run: |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> "$GITHUB_ENV"
echo "repository_name=$(basename `git rev-parse --show-toplevel`)" >> "$GITHUB_ENV"
-
name: Create Manifest
uses: int128/docker-manifest-create-action@v2
with:
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.repository_name }}:${{ env.branch }}-${{ env.sha_short }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.repository_name }}:latest
sources: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.repository_name }}:${{ env.branch }}-${{ env.sha_short }}-amd64
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.repository_name }}:${{ env.branch }}-${{ env.sha_short }}-arm64