ci: migrate to forgejo
All checks were successful
Checks / check (push) Successful in -6m19s
Build and Push Docker Image / Build and Push Image (push) Successful in -6m56s

This commit is contained in:
Vladimir Rubin 2024-12-07 16:05:37 +02:00
parent 08108ef71a
commit 13a1f32d8d
Signed by: vavakado
GPG key ID: CAB744727F36B524
3 changed files with 33 additions and 22 deletions

View file

@ -19,7 +19,7 @@ jobs:
- name: Setup ssl - name: Setup ssl
run: wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.23_amd64.deb && sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.23_amd64.deb run: wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.23_amd64.deb && sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.23_amd64.deb
- uses: erlef/setup-beam@v1 - uses: https://github.com/erlef/setup-beam@v1
env: env:
ImageOS: ubuntu24 ImageOS: ubuntu24
with: with:

View file

@ -3,12 +3,12 @@ name: Build and Push Docker Image
on: on:
push: push:
branches: branches:
- main # Change this to your default branch if different - main
jobs: jobs:
build: build:
name: Build and Push Image name: Build and Push Image
runs-on: ubuntu-latest-root # This specifies the environment for the job runs-on: ubuntu-latest-root
steps: steps:
- name: Checkout Repository - name: Checkout Repository
@ -17,9 +17,9 @@ jobs:
- name: Login to Docker Registry - name: Login to Docker Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.vavakado.xyz # Replace with your Docker registry URL registry: git.vavakado.xyz
username: ${{ gitea.actor }} # The actor who triggered the action username: vavakado
password: ${{ secrets.REGISTRY_TOKEN }} # Your registry token secret password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build Docker Image - name: Build Docker Image
run: | run: |

View file

@ -7,6 +7,7 @@ on:
description: "Version for the release (e.g., v1.0.0)" description: "Version for the release (e.g., v1.0.0)"
required: true required: true
default: "v1.0.0" default: "v1.0.0"
type: string
jobs: jobs:
release: release:
@ -20,28 +21,38 @@ jobs:
- name: Login to Docker Registry - name: Login to Docker Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.vavakado.xyz # Replace with your Docker registry URL registry: git.vavakado.xyz
username: ${{ gitea.actor }} # The actor who triggered the action username: vavakado
password: ${{ secrets.REGISTRY_TOKEN }} # Your registry token secret password: ${{ secrets.REGISTRY_TOKEN }}
- name: Create Git Tag - name: Create Git Tag
run: | run: |
git tag ${{ github.event.inputs.version }} git tag ${{ github.event.inputs.version }}
git push origin ${{ github.event.inputs.version }} git push origin ${{ github.event.inputs.version }}
- name: Create Release # - name: Create Release
run: | # run: |
curl -X POST -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ # curl -X POST -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
-H "Content-Type: application/json" \ # -H "Content-Type: application/json" \
-d '{ # -d '{
"tag_name": "${{ github.event.inputs.version }}", # "tag_name": "${{ github.event.inputs.version }}",
"target_commitish": "main", # Change if your default branch is different # "target_commitish": "main", # Change if your default branch is different
"name": "${{ github.event.inputs.version }}", # "name": "${{ github.event.inputs.version }}",
"body": "Release for version ${{ github.event.inputs.version }}", # "body": "Release for version ${{ github.event.inputs.version }}",
"draft": false, # "draft": false,
"prerelease": false # "prerelease": false
}' \ # }' \
https://git.vavakado.xyz/api/v1/repos/${{ gitea.repository_owner }}/${{ gitea.repository }}/releases # https://git.vavakado.xyz/api/v1/repos/${{ gitea.repository_owner }}/${{ gitea.repository }}/releases
# - name: Create Release
# uses: actions/forgejo-release@v2
# with:
# direction: upload
# tag: ${{ github.event.inputs.version }}
# title: ${{ github.event.inputs.version }}
# token: ${{ secrets.RELEASE_TOKEN }}
# release-notes-assistant: true
# release-dir: ./
- name: Build Docker Image - name: Build Docker Image
run: | run: |