generated from alecodes/base-template
build: add docker build setup
This commit is contained in:
parent
b0506c3eab
commit
66b21dabcd
6 changed files with 84 additions and 20 deletions
29
.forgejo/workflows/build-docker-image.yaml
Normal file
29
.forgejo/workflows/build-docker-image.yaml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
name: Publish image
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
create-docker-images:
|
||||
runs-on: host
|
||||
steps:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.alecodes.page
|
||||
username: ${{ vars.CONTAINER_REGISTRY_USER }}
|
||||
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: |
|
||||
git.alecodes.page/alecodes/miniflux-archive:latest
|
||||
git.alecodes.page/alecodes/miniflux-archive:${{ github.sha }}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
name: Template migration
|
||||
|
||||
# The workflow will run only when `use this template` is used
|
||||
on: create
|
||||
|
||||
jobs:
|
||||
create:
|
||||
runs-on: docker
|
||||
|
||||
steps:
|
||||
- name: "Check out the repo"
|
||||
uses: "actions/checkout@v4"
|
||||
|
||||
- name: "Update commit"
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: "chore: initial commit"
|
||||
commit_options: "--amend"
|
||||
push_options: "--force"
|
||||
skip_fetch: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue