From 13a1f32d8d1a6589e8b40a988919936e902a22c9 Mon Sep 17 00:00:00 2001 From: Vladimir Rubin Date: Sat, 7 Dec 2024 16:05:37 +0200 Subject: [PATCH] ci: migrate to forgejo --- {.gitea => .forgejo}/workflows/checks.yaml | 2 +- {.gitea => .forgejo}/workflows/docker.yaml | 10 ++--- {.gitea => .forgejo}/workflows/release.yaml | 43 +++++++++++++-------- 3 files changed, 33 insertions(+), 22 deletions(-) rename {.gitea => .forgejo}/workflows/checks.yaml (94%) rename {.gitea => .forgejo}/workflows/docker.yaml (66%) rename {.gitea => .forgejo}/workflows/release.yaml (52%) diff --git a/.gitea/workflows/checks.yaml b/.forgejo/workflows/checks.yaml similarity index 94% rename from .gitea/workflows/checks.yaml rename to .forgejo/workflows/checks.yaml index 98e3ebc..3a132f7 100644 --- a/.gitea/workflows/checks.yaml +++ b/.forgejo/workflows/checks.yaml @@ -19,7 +19,7 @@ jobs: - 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 - - uses: erlef/setup-beam@v1 + - uses: https://github.com/erlef/setup-beam@v1 env: ImageOS: ubuntu24 with: diff --git a/.gitea/workflows/docker.yaml b/.forgejo/workflows/docker.yaml similarity index 66% rename from .gitea/workflows/docker.yaml rename to .forgejo/workflows/docker.yaml index 69e8bcf..5698cef 100644 --- a/.gitea/workflows/docker.yaml +++ b/.forgejo/workflows/docker.yaml @@ -3,12 +3,12 @@ name: Build and Push Docker Image on: push: branches: - - main # Change this to your default branch if different + - main jobs: build: name: Build and Push Image - runs-on: ubuntu-latest-root # This specifies the environment for the job + runs-on: ubuntu-latest-root steps: - name: Checkout Repository @@ -17,9 +17,9 @@ jobs: - name: Login to Docker Registry uses: docker/login-action@v3 with: - registry: git.vavakado.xyz # Replace with your Docker registry URL - username: ${{ gitea.actor }} # The actor who triggered the action - password: ${{ secrets.REGISTRY_TOKEN }} # Your registry token secret + registry: git.vavakado.xyz + username: vavakado + password: ${{ secrets.REGISTRY_TOKEN }} - name: Build Docker Image run: | diff --git a/.gitea/workflows/release.yaml b/.forgejo/workflows/release.yaml similarity index 52% rename from .gitea/workflows/release.yaml rename to .forgejo/workflows/release.yaml index e14525d..6fdf34d 100644 --- a/.gitea/workflows/release.yaml +++ b/.forgejo/workflows/release.yaml @@ -7,6 +7,7 @@ on: description: "Version for the release (e.g., v1.0.0)" required: true default: "v1.0.0" + type: string jobs: release: @@ -20,28 +21,38 @@ jobs: - name: Login to Docker Registry uses: docker/login-action@v3 with: - registry: git.vavakado.xyz # Replace with your Docker registry URL - username: ${{ gitea.actor }} # The actor who triggered the action - password: ${{ secrets.REGISTRY_TOKEN }} # Your registry token secret + registry: git.vavakado.xyz + username: vavakado + password: ${{ secrets.REGISTRY_TOKEN }} - name: Create Git Tag run: | git tag ${{ github.event.inputs.version }} git push origin ${{ github.event.inputs.version }} - - name: Create Release - run: | - curl -X POST -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - -H "Content-Type: application/json" \ - -d '{ - "tag_name": "${{ github.event.inputs.version }}", - "target_commitish": "main", # Change if your default branch is different - "name": "${{ github.event.inputs.version }}", - "body": "Release for version ${{ github.event.inputs.version }}", - "draft": false, - "prerelease": false - }' \ - https://git.vavakado.xyz/api/v1/repos/${{ gitea.repository_owner }}/${{ gitea.repository }}/releases + # - name: Create Release + # run: | + # curl -X POST -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + # -H "Content-Type: application/json" \ + # -d '{ + # "tag_name": "${{ github.event.inputs.version }}", + # "target_commitish": "main", # Change if your default branch is different + # "name": "${{ github.event.inputs.version }}", + # "body": "Release for version ${{ github.event.inputs.version }}", + # "draft": false, + # "prerelease": false + # }' \ + # 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 run: |