ci: add forgejo workflow to build and push docker image
Some checks failed
docker / build (push) Has been cancelled
Some checks failed
docker / build (push) Has been cancelled
This commit is contained in:
parent
8eff6d17b8
commit
bc9b7ad445
1 changed files with 44 additions and 0 deletions
44
.forgejo/workflows/docker.yml
Normal file
44
.forgejo/workflows/docker.yml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
name: docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ['v*']
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: summer.node.femboy.page
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: summer.node.femboy.page/arcanegram/arcanesync-server
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=tag
|
||||
type=sha,format=short
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
Loading…
Add table
Add a link
Reference in a new issue