Skip to content

fix: data show to web script #37

fix: data show to web script

fix: data show to web script #37

Workflow file for this run

name: releaser

Check failure on line 1 in .github/workflows/releaser.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/releaser.yml

Invalid workflow file

you may only define one of `paths` and `paths-ignore` for a single event
on:
workflow_dispatch:
push:
branches: [main]
paths-ignore:
- README.md
- .github/**
- '!.github/workflows/**'
paths:
- server/**
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
defaults:
run:
working-directory: ./server
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@v3
with:
cosign-release: 'v2.1.1'
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
# https://github.com/docker/login-action
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/docker/metadata-action
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
labels: git_commit=${{ github.sha }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,enable=true,priority=600,prefix=,suffix=,event=branch
type=ref,enable=true,priority=600,prefix=,suffix=,event=tag
type=ref,enable=true,priority=600,prefix=pr-,suffix=,event=pr
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: ${{ runner.os }}-buildx-
- uses: docker/build-push-action@v5
with:
context: server
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
# linux/386,linux/amd64,linux/arm/v7,linux/arm64/v8
platforms: linux/amd64
build-args: |
GIT_COMMIT=${{ github.sha }}
GIT_BRANCH=${{ github.ref }}
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache