forgejo
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| forgejo [2025/03/28 05:23] – ryan | forgejo [2025/03/28 08:03] (current) – [Set up Forgerunner:] ryan | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| ====Set up Forgerunner: | ====Set up Forgerunner: | ||
| - | - make a new directory | + | - Copy and paste the following |
| - | services: | + | |
| + | |||
| + | mkdir forgerunner | ||
| + | cd forgerunner | ||
| + | mkdir data | ||
| + | touch compose.yml | ||
| + | | ||
| forgejo-runner: | forgejo-runner: | ||
| hostname: forgerunner | hostname: forgerunner | ||
| Line 12: | Line 18: | ||
| container_name: | container_name: | ||
| environment: | environment: | ||
| - | DOCKER_HOST: | + | DOCKER_HOST: |
| user: 0:0 #Gives permission errors if not root. Can this be fixed somehow? | user: 0:0 #Gives permission errors if not root. Can this be fixed somehow? | ||
| volumes: | volumes: | ||
| - ./ | - ./ | ||
| - | - /var/run/docker.sock:/ | + | - /var/run/podman/ |
| restart: unless-stopped | restart: unless-stopped | ||
| | | ||
| - | command: forgejo-runner -c / | + | command: forgejo-runner -c / |
| - | - save it and create a new folder in the same directory called " | + | |
| + | sudo podman-compose run --rm forgejo-runner ' | ||
| + | sudo podman-compose up -d | ||
| + | sudo podman-compose run --rm forgejo-runner ' | ||
| + | |||
| + | - STOP and verify that something hasn't gone wrong at this step. Check the new config.yaml that was generated. | ||
| + | - Follow the prompts. Enter your forgejo url and runner token from YourRepo -> Settings -> Actions -> Runners -> Create new runner | ||
| - | mkdir forgerunner | + | - Check the runners list in your repository. It should show up as inactive. |
| - | | + | |
| - | | + | - Navigate to your repo either in browser or locally and create a new file under .forgejo/ |
| - | | + | |
| - | | + | - Inside deploy.yml paste the following: |
| - | | + | |
| - | | + | |
| - | image: code.forgejo.org/ | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | user: 0:0 #Gives permission errors if not root. Can this be fixed somehow? | + | # |
| - | | + | # |
| - | - ./data:/data | + | |
| - | - / | + | jobs: |
| - | | + | |
| - | + | | |
| - | command: | + | |
| - | + | - name: SSH Deploy | |
| - | - | + | uses: https://github.com/appleboy/ssh-action@v1 |
| + | with: | ||
| + | host: ${{ secrets.HOST_ADDRESS }} | ||
| + | username: forgejo | ||
| + | key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
| + | | ||
| + | ls | ||
| + | cd homeserver | ||
| + | ${{ secrets.SCRIPT }} | ||
| + | | ||
| + | - The variables used are stored in the settings of your repository under YourRepo -> Settings -> Actions -> Secrets | ||
| + | Make sure to create matching secrets or adjust the variables accordingly. | ||
| + | |||
| + | - Testing required: by commenting out the line "on: [push]" | ||
| + | |||
| + | - Under " | ||
| + | git pull https://USER: | ||
| + | |||
| + | Make sure your local repository is synced by pulling or pushing the changes. Now the script should automatically run on every push. | ||
forgejo.1743139392.txt.gz · Last modified: by ryan