Merge branch 'main' of ssh://git.commandware.com:2222/demos/api7-demo
This commit is contained in:
@@ -18,27 +18,23 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Container Registry
|
||||
if: github.event_name == 'push'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.PACKAGES_REGISTRY || gitea.server_url }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
password: ${{ secrets.PACKAGES_PUSH_TOKEN }}
|
||||
password: ${{ secrets.TOKEN }}
|
||||
|
||||
- name: Extract metadata for web image
|
||||
id: meta-web
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ vars.PACKAGES_REGISTRY || gitea.server_url }}/${{ gitea.repository }}/web
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
|
||||
- name: Build and push web image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./web
|
||||
file: ./web/Dockerfile
|
||||
push: ${{ github.event_name == 'push' }}
|
||||
tags: ${{ steps.meta-web.outputs.tags }}
|
||||
labels: ${{ steps.meta-web.outputs.labels }}
|
||||
cache-from: type=registry,ref=${{ vars.PACKAGES_REGISTRY || gitea.server_url }}/${{ gitea.repository }}/web:buildcache
|
||||
@@ -54,27 +50,23 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Container Registry
|
||||
if: github.event_name == 'push'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.PACKAGES_REGISTRY || gitea.server_url }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
password: ${{ secrets.PACKAGES_PUSH_TOKEN }}
|
||||
password: ${{ secrets.TOKEN }}
|
||||
|
||||
- name: Extract metadata for api image
|
||||
id: meta-api
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ vars.PACKAGES_REGISTRY || gitea.server_url }}/${{ gitea.repository }}/api
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
|
||||
- name: Build and push api image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./api
|
||||
file: ./api/Dockerfile
|
||||
push: ${{ github.event_name == 'push' }}
|
||||
tags: ${{ steps.meta-api.outputs.tags }}
|
||||
labels: ${{ steps.meta-api.outputs.labels }}
|
||||
cache-from: type=registry,ref=${{ vars.PACKAGES_REGISTRY || gitea.server_url }}/${{ gitea.repository }}/api:buildcache
|
||||
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
echo "📤 Uploading chart to Gitea Package Registry..."
|
||||
|
||||
curl --fail-with-body \
|
||||
-H "Authorization: token ${{ secrets.PACKAGES_PUSH_TOKEN }}" \
|
||||
-H "Authorization: token ${{ secrets.TOKEN }}" \
|
||||
-X POST \
|
||||
-F "chart=@${CHART_FILE}" \
|
||||
https://${{ vars.PACKAGES_REGISTRY || gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/helm/api/charts
|
||||
|
||||
Reference in New Issue
Block a user