Files
junk2jive-server/.gitea/workflows/build.yml
rogueking 84e150cb11
Some checks failed
Build and Push Docker Image / Build and push image (push) Failing after 43s
Run Go Tests / build (push) Failing after 0s
golangci-lint / lint (push) Failing after 2m0s
added workflows and fixed router
2025-05-06 14:49:14 -07:00

52 lines
1.3 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build and push image
runs-on: ubuntu-latest
env:
RUNNER_TOOL_CACHE: /toolcache
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-docker-${{ github.sha }}
restore-keys: |
${{ runner.os }}-docker-
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: registry.syntinel.dev
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
registry.syntinel.dev/junk2jive-server:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max