trying to use upload-artifact action
This commit is contained in:
@@ -28,9 +28,9 @@ jobs:
|
|||||||
- name: Create archive
|
- name: Create archive
|
||||||
run: tar -czf docker-images/bee-dashboard/bee-dashboard.tar -C src/build .
|
run: tar -czf docker-images/bee-dashboard/bee-dashboard.tar -C src/build .
|
||||||
- name: Upload folder as artifact
|
- name: Upload folder as artifact
|
||||||
uses: https://gitea.com/actions/gitea-upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: build-artifact
|
name: bee-dashboard.tar
|
||||||
path: docker-images/bee-dashboard/bee-dashboard.tar
|
path: docker-images/bee-dashboard/bee-dashboard.tar
|
||||||
# - name: Publish archive to gitea.woggioni.net
|
# - name: Publish archive to gitea.woggioni.net
|
||||||
# run: curl --user woggioni:${{ secrets.PUBLISHER_TOKEN }} --upload-file docker-images/bee-dashboard/bee-dashboard.tar https://gitea.woggioni.net/api/packages/woggioni/generic/bee-dashboard/0.35.1/bee-dashboard.tar
|
# run: curl --user woggioni:${{ secrets.PUBLISHER_TOKEN }} --upload-file docker-images/bee-dashboard/bee-dashboard.tar https://gitea.woggioni.net/api/packages/woggioni/generic/bee-dashboard/0.35.1/bee-dashboard.tar
|
||||||
@@ -38,17 +38,21 @@ jobs:
|
|||||||
runs-on: hostinger
|
runs-on: hostinger
|
||||||
needs: node-build
|
needs: node-build
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
path: docker-images
|
||||||
|
- name: Download artifact
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: bee-dashboard.tar
|
||||||
|
path: docker-images/bee-dashboard
|
||||||
- name: Login to Gitea container registry
|
- name: Login to Gitea container registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: gitea.woggioni.net
|
registry: gitea.woggioni.net
|
||||||
username: woggioni
|
username: woggioni
|
||||||
password: ${{ secrets.PUBLISHER_TOKEN }}
|
password: ${{ secrets.PUBLISHER_TOKEN }}
|
||||||
- name: Download artifact
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: build.artifact
|
|
||||||
path: docker-images/bee-dashboard/bee-dashboard.tar
|
|
||||||
- name: Build and push bee-dashboard images
|
- name: Build and push bee-dashboard images
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
@@ -65,14 +69,23 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
runs-on: hostinger
|
runs-on: hostinger
|
||||||
needs: node-build
|
needs: node-build
|
||||||
|
container:
|
||||||
|
image: node:26-alpine
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifact
|
- uses: actions/setup-node@v6
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: build.artifact
|
node-version: 26
|
||||||
path: docker-images/bee-dashboard/bee-dashboard.tar
|
cache: 'npm'
|
||||||
|
- name: Download artifact
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: bee-dashboard.tar
|
||||||
|
path: .
|
||||||
|
- run: mkdir build
|
||||||
|
- name: Extract artifact
|
||||||
|
run: tar -C build -xf /workspace/woggioni/docker-images/bee-dashboard.tar
|
||||||
- name: Deploy to Cloudflare
|
- name: Deploy to Cloudflare
|
||||||
run: npx wrangler pages deploy --project-name bee-dashboard --branch main src/build
|
run: npx wrangler pages deploy --project-name bee-dashboard --branch main build
|
||||||
env:
|
env:
|
||||||
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
|
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user