Skip to content

Add user-id to store #45

Add user-id to store

Add user-id to store #45

name: CICD Docker Deployment Frontend
on:
push:
branches: [ main ]
paths: 'frontend/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_API_TOKEN }}
- name: Build and Push the Docker image
uses: docker/build-push-action@v5
with:
push: true
context: frontend
tags: noebuerki/ons-webapp:latest
- name: Trigger Stack redeploy
run: |
curl --location --request PUT -k 'https://portainer.noebuerki-services.ch/api/stacks/15/git/redeploy?endpointId=2' --header 'Content-Type: application/json' --header 'X-API-Key: ${{ secrets.PORTAINER_API_TOKEN }}' --data '{
"PullImage": true,
"RepositoryAuthentication": true,
"RepositoryReferenceName": "refs/heads/main"
}'