This commit is contained in:
commit
a31df71d2b
3 changed files with 101 additions and 0 deletions
29
.forgejo/workflows/build-and-push.yml
Normal file
29
.forgejo/workflows/build-and-push.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
name: Build and Push to Forgejo Registry
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '**/Dockerfile'
|
||||
- '**/build-and-push.yml'
|
||||
# schedule:
|
||||
# - cron: "0 0 * * 0" # Weekly at 00:00 UTC Sunday
|
||||
|
||||
jobs:
|
||||
checkout:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Login to registry
|
||||
uses: docker/login-actions@v3
|
||||
with:
|
||||
registry: ${{ vars.FORGEJO_URL }}
|
||||
username: ${{ vars.FORGEJO_USERNAME }}
|
||||
password: ${{ secrets.FORGEJO_PACKAGE_TOKEN }}
|
||||
|
||||
- name: Build 'n Push
|
||||
run: |
|
||||
docker build -t git.k4li.de/docker/forgejo-runner:latest .
|
||||
docker push git.k4li.de/docker/forgejo-runner:latest
|
Loading…
Add table
Add a link
Reference in a new issue