generated from alecodes/base-template
build: add actions workflow for release
Some checks failed
Publish image / create-docker-images (push) Failing after 3m25s
Some checks failed
Publish image / create-docker-images (push) Failing after 3m25s
This commit is contained in:
parent
b22a5e5876
commit
ff1a9858cd
1 changed files with 62 additions and 0 deletions
62
.forgejo/workflows/build-image.yaml
Normal file
62
.forgejo/workflows/build-image.yaml
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
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
|
||||||
|
push: true
|
||||||
|
outputs: |
|
||||||
|
type=local,dest=./build-out
|
||||||
|
type=docker
|
||||||
|
tags: |
|
||||||
|
git.alecodes.page/alecodes/compendium:latest
|
||||||
|
git.alecodes.page/alecodes/compendium:${{ github.sha }}
|
||||||
|
|
||||||
|
- name: Publish release
|
||||||
|
uses: https://code.forgejo.org/actions/forgejo-release@v2.5.0
|
||||||
|
with:
|
||||||
|
url: "https://git.alecodes.page"
|
||||||
|
repo: "alecodes/compendium"
|
||||||
|
direction: upload
|
||||||
|
# tag: "${{ github.ref_name }}"
|
||||||
|
sha: "${{ github.sha }}"
|
||||||
|
release-dir: build-out
|
||||||
|
# token: ${{ secrets.TOKEN }}
|
||||||
|
override: ${{ vars.OVERRIDE || "false" }}
|
||||||
|
verbose: ${{ vars.VERBOSE || "false" }}
|
||||||
|
|
||||||
|
# deploy:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs:
|
||||||
|
# - create-docker-images
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout code
|
||||||
|
# uses: actions/checkout@v4
|
||||||
|
# - name: 'Docker Stack Deploy'
|
||||||
|
# uses: https://github.com/cssnr/stack-deploy-action@v1
|
||||||
|
# with:
|
||||||
|
# host: ${{ vars.DOCKER_SWARM_HOST }}
|
||||||
|
# port: ${{ vars.DOCKER_SWARM_PORT }}
|
||||||
|
# user: ${{ secrets.DOCKER_SWARM_USER }}
|
||||||
|
# ssh_key: '${{ secrets.DOCKER_SWARM_SSH_KEY }}'
|
||||||
|
# file: 'docker-stack.yaml'
|
||||||
|
# name: 'personal_page'
|
||||||
Loading…
Add table
Add a link
Reference in a new issue