Skip to content

release: v4.3.0

release: v4.3.0 #25

Workflow file for this run

name: Deploy
on:
push:
tags:
- 'v*'
jobs:
backend:
name: Backend
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Deployment Options
id: deployment
run: |
case "$GITHUB_REF" in
refs/tags/v*)
VERSION="${GITHUB_REF:11}"
MAJOR="${GITHUB_REF:11:1}"
;;
esac
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "major=$MAJOR" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ secrets.DOCKER_REGISTRY }}/stp/server-24:${{ steps.deployment.outputs.version }}
${{ secrets.DOCKER_REGISTRY }}/stp/server-24:${{ steps.deployment.outputs.major }}
cache-to: type=gha,mode=max
cache-from: type=gha
- name: Rancher Deploy
uses: sekassel-research/actions-rancher-update@v3.0.0
with:
rancher_url: ${{ secrets.RANCHER_URL }}
rancher_token: ${{ secrets.RANCHER_TOKEN }}
cluster_id: ${{ secrets.CLUSTER_ID }}
project_id: ${{ secrets.PROJECT_ID }}
namespace: ${{ secrets.NAMESPACE }}
deployment: ${{ secrets.DEPLOYMENT }}-v${{ steps.deployment.outputs.major }}
docker_image: ${{ secrets.DOCKER_REGISTRY }}/stp/server-24:${{ steps.deployment.outputs.version }}
- name: Discord Notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: |
Eine neue Serverversion ist verfügbar: `${{ steps.deployment.outputs.version }}`
<https://stpellar.uniks.de/api/v${{ steps.deployment.outputs.major }}>