fgo-ta-com-website/.forgejo/workflows/build_preview.yml

55 lines
1.5 KiB
YAML
Raw Normal View History

2024-01-03 00:18:53 +00:00
on:
push:
tags:
- '[0-9]+\.[0-9]+\.[0-9]+pre[0-9]+'
jobs:
checking:
runs-on: docker
container: node:lts
steps:
- name: Checkout source code
uses: https://code.forgejo.org/actions/checkout@v3
- name: Install packages
run: npm install
- name: Run astro check (linting + static analysis)
run: npm run astro check
build-site:
needs: [checking]
if: success()
runs-on: dind
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
config-inline: |
[registry."docker.io"]
mirrors = ["https://docker-cache.neshweb.net"]
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: forgejo.neshweb.net
username: ${{ secrets.FORGEJO_USERNAME }}
password: ${{ secrets.FORGEJO_TOKEN }}
- name: Push to Package Registry
uses: docker/build-push-action@v5
with:
push: true
tags: forgejo.neshweb.net/firq/fgo-ta-com-website:${{ github.ref_name }}, forgejo.neshweb.net/firq/fgo-ta-com-website:preview
publish:
needs: [build-site]
if: success()
runs-on: docker
steps:
- name: Release New Version
2024-01-03 18:36:07 +00:00
uses: https://code.forgejo.org/Neshura/forgejo-release@main
2024-01-03 00:18:53 +00:00
with:
direction: upload
url: https://forgejo.neshweb.net
release-dir: release
token: ${{ secrets.FORGEJO_TOKEN }}
tag: ${{ github.ref_name }}
2024-01-03 18:36:07 +00:00
prerelease: true