This commit is contained in:
1 parent
51c024edde
commit
0a950cefe2
4 files changed
+64
-49
No files matched your search
@@ -1,64 +1,46 @@
|
||||
name: Docker Build & Push
|
||||
run-name: Release ${{ gitea.ref_name }}
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Code auschecken
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Bei Gitea Container Registry anmelden
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: 127.0.0.1:3000
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.token }}
|
||||
|
||||
- name: Docker Image bauen (nur lokal im Runner)
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
push: false
|
||||
tags: |
|
||||
127.0.0.1:3000/rudi/tandur:${{ gitea.ref_name }}
|
||||
127.0.0.1:3000/rudi/tandur:latest
|
||||
|
||||
- name: Images zu Gitea pushen
|
||||
run: |
|
||||
docker push 127.0.0.1:3000/rudi/tandur:${{ gitea.ref_name }}
|
||||
docker push 127.0.0.1:3000/rudi/tandur:latest
|
||||
|
||||
release:
|
||||
if: startsWith(gitea.ref, 'refs/tags/v')
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Code auschecken
|
||||
uses: actions/checkout@v3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Gitea Release erstellen
|
||||
- name: Log in to Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.schamagusa.de
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.RELEASE_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
git.schamagusa.de/${{ gitea.repository }}:${{ gitea.ref_name }}
|
||||
git.schamagusa.de/${{ gitea.repository }}:latest
|
||||
|
||||
- name: Prepare release notes
|
||||
run: |
|
||||
sed "s|{{VERSION}}|${{ gitea.ref_name }}|g" CHANGELOG.md > release_notes.md
|
||||
cat release_notes.md
|
||||
|
||||
- name: Create Release
|
||||
uses: https://gitea.com/actions/gitea-release-action@main
|
||||
with:
|
||||
api_key: '${{ secrets.TOKEN }}'
|
||||
body_path: release_notes.md
|
||||
prerelease: ${{ contains(gitea.ref_name, '-rc') || contains(gitea.ref_name, '-beta') || contains(gitea.ref_name, '-alpha') }}
|
||||
files: |-
|
||||
docker-compose.yaml
|
||||
body: |
|
||||
## Docker Image:
|
||||
|
||||
```bash
|
||||
docker pull git.schamagusa.de/rudi/tandur:latest
|
||||
```
|
||||
## Docker Compose
|
||||
Download the `docker-compose.yaml`
|
||||
and then
|
||||
```bash
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
```
|
||||
files: |
|
||||
example.docker-compose.yaml
|
||||
example.env
|
||||
Reference in new issue
Block a user