81 lines
2.3 KiB
YAML
81 lines
2.3 KiB
YAML
name: Building and publishing Homebrewery as Docker Image
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-24.04
|
|
env:
|
|
TAG_NAME: ${{ github.event.release.tag_name }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Checkout homebrewery
|
|
uses: actions/checkout@v4
|
|
with:
|
|
github-server-url: https://github.com
|
|
repository: naturalcrit/homebrewery.git
|
|
ref: ${{ github.event.release.tag_name }}
|
|
token: ${{ secrets.GH_TOKEN }}
|
|
path: homebrewery
|
|
|
|
- name: Login to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.morlana.online
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Getting build time
|
|
run: |
|
|
echo "CREATED_AT=$(date -u --rfc-3339=seconds)" >> "$GITHUB_ENV"
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
context: .
|
|
file: ./Dockerfile
|
|
build-args: |
|
|
VERSION=${{ github.event.release.tag_name }}
|
|
REVISION=${{ github.sha }}
|
|
CREATED_AT=$CREATED_AT
|
|
tags: |
|
|
git.morlana.online/${{ github.repository_owner }}/homebrewery:latest
|
|
git.morlana.online/${{ github.repository_owner }}/homebrewery:${{ github.event.release.tag_name }}
|
|
kosmos367/homebrewery:latest
|
|
kosmos367/homebrewery:${{ github.event.release.tag_name }}
|
|
|
|
update-description:
|
|
runs-on: ubuntu-24.04
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Docker Hub Description
|
|
uses: peter-evans/dockerhub-description@v4
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
repository: kosmos367/homebrewery
|