diff --git a/.github/workflows/deploy-docker.yml b/.github/workflows/deploy-docker.yml index adde927..eeeee0d 100644 --- a/.github/workflows/deploy-docker.yml +++ b/.github/workflows/deploy-docker.yml @@ -1,12 +1,9 @@ name: Docker Image CI on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + workflow_call: -jobs: +jobs: build-and-push: runs-on: ubuntu-latest @@ -76,14 +73,14 @@ jobs: echo "Gekozen versie: $VERSION" # Stop en verwijder de huidige container - sudo docker stop paypoint || true - sudo docker rm paypoint || true + docker stop paypoint || true + docker rm paypoint || true # Haal de nieuwste image binnen - sudo docker pull veenm/paypoint:$VERSION + docker pull veenm/paypoint:$VERSION # Start een nieuwe container - sudo docker run -d --name paypoint --restart unless-stopped -p 80:15001 veenm/paypoint:$VERSION + docker run -d --name paypoint --restart unless-stopped -p 15001:80 veenm/paypoint:$VERSION # Opruimen oude images - sudo docker image prune -f + docker image prune -f diff --git a/.github/workflows/increase-version.yml b/.github/workflows/increase-version.yml new file mode 100644 index 0000000..62de3e4 --- /dev/null +++ b/.github/workflows/increase-version.yml @@ -0,0 +1,35 @@ +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 + + build-and-run: + uses: ./.github/workflows/deploy-docker.yml@main diff --git a/package-lock.json b/package-lock.json index 25dbc11..4871bf4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pay-point", - "version": "0.0.0", + "version": "0.0.15", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pay-point", - "version": "0.0.0", + "version": "0.0.15", "dependencies": { "@angular/animations": "^19.0.0", "@angular/cdk": "^19.0.0", diff --git a/package.json b/package.json index b80b4c7..5e2a9b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pay-point", - "version": "0.0.0", + "version": "0.0.15", "scripts": { "ng": "ng", "start": "ng serve", diff --git a/src/app/services/appointment.service.ts b/src/app/services/appointment.service.ts index 5afcd08..17b53a7 100644 --- a/src/app/services/appointment.service.ts +++ b/src/app/services/appointment.service.ts @@ -6,9 +6,8 @@ import {Appointment} from '../models/appointment'; providedIn: 'root', }) export class AppointmentService { - baseApi = "http://localhost:8080/api/appointments"; - - // baseApi = "https://api.melvanveen.nl/api/appointments"; + // baseApi = "http://localhost:8080/api/appointments"; + baseApi = "https://api.melvanveen.nl/api/appointments"; constructor(private http: HttpClient) { } diff --git a/src/app/services/auth.service.ts b/src/app/services/auth.service.ts index 202716f..8145ebc 100644 --- a/src/app/services/auth.service.ts +++ b/src/app/services/auth.service.ts @@ -8,8 +8,8 @@ import {jwtDecode} from 'jwt-decode'; providedIn: 'root', }) export class AuthService { - private baseApi = 'http://localhost:8080/api/auth/login'; - // baseApi = "https://api.melvanveen.nl/api/auth/login"; + // private baseApi = 'http://localhost:8080/api/auth/login'; + baseApi = "https://api.melvanveen.nl/api/auth/login"; jwtHelper = new JwtHelperService(); constructor(private http: HttpClient) { diff --git a/src/app/services/customer.service.ts b/src/app/services/customer.service.ts index d174c9c..2a22baf 100644 --- a/src/app/services/customer.service.ts +++ b/src/app/services/customer.service.ts @@ -7,9 +7,8 @@ import {Observable} from 'rxjs'; providedIn: 'root', }) export class CustomerService { - baseApi = "http://localhost:8080/api/customers"; - - // baseApi = "https://api.melvanveen.nl/api/customers"; + // baseApi = "http://localhost:8080/api/customers"; + baseApi = "https://api.melvanveen.nl/api/customers"; constructor(private http: HttpClient) {