Update:
-delen van agenda toegevoegd -popup aangepast -accepteren van uitnodiging toegevoegd -koppelen van gebruiker aan bedrijf -versturen van uitnodiging via mail
This commit is contained in:
90
.github/workflows/deploy-docker.yml
vendored
Normal file
90
.github/workflows/deploy-docker.yml
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
name: Docker Image CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- "docker-build-*"
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Stap 1: Code ophalen
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Stap 2: Versienummer ophalen uit package.json en opslaan als artifact
|
||||
- name: Extract Angular version
|
||||
run: |
|
||||
echo "$(cat package.json | jq -r '.version')" > version.txt
|
||||
- name: Save version as artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: version
|
||||
path: version.txt
|
||||
|
||||
# Stap 3: Inloggen bij Docker Hub
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
# Stap 4: Docker-image bouwen en taggen met Angular-versie
|
||||
- name: Build the Docker image
|
||||
run: |
|
||||
VERSION=$(cat version.txt)
|
||||
docker buildx build . --file Dockerfile --tag veenm/paypoint:$VERSION --tag veenm/paypoint:latest --platform linux/amd64
|
||||
|
||||
# Stap 5: Docker-image pushen naar Docker Hub (huidige versie tag)
|
||||
- name: Push the Docker image (version)
|
||||
run: |
|
||||
VERSION=$(cat version.txt)
|
||||
docker push veenm/paypoint:$VERSION
|
||||
|
||||
# Stap 6: Docker-image pushen naar Docker Hub (latest tag)
|
||||
- name: Push the Docker image (latest)
|
||||
run: docker push veenm/paypoint:latest
|
||||
|
||||
deploy:
|
||||
needs: build-and-push
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Stap 1: Artifact ophalen
|
||||
- name: Download version artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: version
|
||||
|
||||
# Stap 2: Lees versie uit het artifact
|
||||
- name: Read version
|
||||
id: read_version
|
||||
run: echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
|
||||
|
||||
# Stap 3: Maak verbinding via SSH naar de TrueNAS SCALE server en update de container
|
||||
- name: SSH into TrueNAS SCALE and update Docker container
|
||||
uses: appleboy/ssh-action@v0.1.10
|
||||
with:
|
||||
host: ${{ secrets.TRUENAS_HOST }}
|
||||
username: ${{ secrets.TRUENAS_USER }}
|
||||
password: ${{ secrets.TRUENAS_PASSWORD }}
|
||||
port: ${{ secrets.TRUENAS_PORT }}
|
||||
script: |
|
||||
VERSION=${{ env.VERSION }}
|
||||
echo "Gekozen versie: $VERSION"
|
||||
|
||||
# Stop en verwijder de huidige container
|
||||
docker stop paypoint || true
|
||||
docker rm paypoint || true
|
||||
|
||||
# Haal de nieuwste image binnen
|
||||
docker pull veenm/paypoint:$VERSION
|
||||
|
||||
# Start een nieuwe container
|
||||
docker run -d --name paypoint --restart unless-stopped -p 15001:80 veenm/paypoint:$VERSION
|
||||
|
||||
# Opruimen oude images
|
||||
docker image prune -f
|
||||
44
.github/workflows/increase-version.yml
vendored
Normal file
44
.github/workflows/increase-version.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Increase Version
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main # Start bij commits op de main branch
|
||||
|
||||
jobs:
|
||||
bump-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.name "Gitea Actions"
|
||||
git config --global user.email "actions@gitea.local"
|
||||
|
||||
- name: Bump version
|
||||
run: |
|
||||
npm version patch --no-git-tag-version
|
||||
git add package.json package-lock.json
|
||||
git commit -m "chore: bump version [skip ci]" || echo "No changes to commit"
|
||||
|
||||
# Pull the latest changes from the remote main branch before pushing
|
||||
git pull origin main --rebase
|
||||
|
||||
# Push changes to remote main branch
|
||||
git push origin main
|
||||
|
||||
trigger-pipeline-b:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Create and push tag
|
||||
run: |
|
||||
git config --global user.name "Gitea Actions"
|
||||
git config --global user.email "actions@gitea.local"
|
||||
git tag docker-build-$(date +%s)
|
||||
git push --tags
|
||||
Reference in New Issue
Block a user