Feature Request: Switch to Forgejo Actions from Drone #259

Closed
opened 2024-05-27 20:37:03 -04:00 by mafyuh · 3 comments
Owner

Summary

Switch to Forgejo Actions from Drone

Motivation

Drone is great but I want to give Forgejo actions a try, so I setup a runner and got it working for my CI yamllint jobs. Looks way cleaner IMO and all in one platform is nice.

Detailed Description

  • Since CI is already done, maybe I can move Renovate from Drone to Actions as well.

Seems the best way to do CD is since the PR can be for any host, is either gonna be a custom shell script that has knowledge of which apps match which host and have Actions just run that script. Or gonna have to write a pretty complex workflow to process which host to SSH to.

n8n works great now but would like to do it from the git source and not a webhook.

Additional Context

Followed the instructions here

### Summary Switch to Forgejo Actions from Drone ### Motivation Drone is great but I want to give Forgejo actions a try, so I setup a runner and got it working for my CI yamllint jobs. Looks way cleaner IMO and all in one platform is nice. ### Detailed Description - [x] Since CI is already done, maybe I can move Renovate from Drone to Actions as well. Seems the best way to do CD is since the PR can be for any host, is either gonna be a custom shell script that has knowledge of which apps match which host and have Actions just run that script. Or gonna have to write a pretty complex workflow to process which host to SSH to. n8n works great now but would like to do it from the git source and not a webhook. ### Additional Context Followed the instructions [here](https://forgejo.org/docs/latest/admin/actions/)
mafyuh added the
enhancement
label 2024-05-27 20:37:03 -04:00
mafyuh added this to the Auto-Homelab project 2024-05-27 20:37:03 -04:00
Author
Owner

Well that was easy.

Renovate has been moved over to Forgejo Actions on my Renovatebot repo. I have turned off the Drone VM for the time being while I test but builds are passing, PR's are working, just need to make sure it runs on cronjob specified.

Here is the working pipeline as my Renovatebot repo is private:

.forgejo/workflows/renovate.yml

name: Renovate

on:
  push:
    branches:
      - main
  schedule:
    - cron: '0 * * * *'
  workflow_dispatch:

jobs:
  validate-config:
    name: Renovate - Validate Config
    runs-on: docker
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Unset Git Variables
        run: |
          unset GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL          

      - name: Validate Renovate Config
        uses: docker://docker.mafyuh.xyz/renovate/renovate:37.379.0
        with:
          args: renovate-config-validator

  run-renovate:
    name: Renovate
    runs-on: docker
    needs: validate-config
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Unset Git Variables
        run: |
          unset GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL          

      - name: Run Renovate
        uses: docker://docker.mafyuh.xyz/renovate/renovate:37.379.0
        with:
          args: renovate --pr-footer="Did Renovate not find changelogs? No worries! [Click here](https://git.mafyuh.dev/mafyuh/Auto-Homelab/src/branch/main/.github/changelogs.md)"
        env:
          RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
          GITHUB_COM_TOKEN: ${{ secrets.GIT_COM_TOKEN }}
Well that was easy. Renovate has been moved over to Forgejo Actions on my Renovatebot repo. I have turned off the Drone VM for the time being while I test but builds are passing, PR's are working, just need to make sure it runs on cronjob specified. Here is the working pipeline as my Renovatebot repo is private: .forgejo/workflows/renovate.yml ``` name: Renovate on: push: branches: - main schedule: - cron: '0 * * * *' workflow_dispatch: jobs: validate-config: name: Renovate - Validate Config runs-on: docker steps: - name: Checkout code uses: actions/checkout@v4 - name: Unset Git Variables run: | unset GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL - name: Validate Renovate Config uses: docker://docker.mafyuh.xyz/renovate/renovate:37.379.0 with: args: renovate-config-validator run-renovate: name: Renovate runs-on: docker needs: validate-config steps: - name: Checkout code uses: actions/checkout@v4 - name: Unset Git Variables run: | unset GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL - name: Run Renovate uses: docker://docker.mafyuh.xyz/renovate/renovate:37.379.0 with: args: renovate --pr-footer="Did Renovate not find changelogs? No worries! [Click here](https://git.mafyuh.dev/mafyuh/Auto-Homelab/src/branch/main/.github/changelogs.md)" env: RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }} GITHUB_COM_TOKEN: ${{ secrets.GIT_COM_TOKEN }} ```
Author
Owner

Cron task works, gonna keep drone VM up for a bit but once I'm confident in Actions I will delete the VM.

Will create new issue for CD through Actions

Cron task works, gonna keep drone VM up for a bit but once I'm confident in Actions I will delete the VM. Will create new issue for CD through Actions
Author
Owner

Deleted VM in mafyuh/Auto-Homelab#309

Deleted VM in mafyuh/Auto-Homelab#309
This repo is archived. You cannot comment on issues.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: mafyuh/Auto-Homelab#259
No description provided.