mirror of
https://github.com/etkecc/synapse-admin.git
synced 2025-02-16 11:29:48 +03:00
try ci artifacts
This commit is contained in:
parent
3c6259cc88
commit
c8246a1d19
1 changed files with 68 additions and 40 deletions
108
.github/workflows/workflow.yml
vendored
108
.github/workflows/workflow.yml
vendored
|
@ -6,56 +6,84 @@ env:
|
||||||
upstream_version: v0.10.3
|
upstream_version: v0.10.3
|
||||||
etke_version: etke6
|
etke_version: etke6
|
||||||
bunny_version: v0.1.0
|
bunny_version: v0.1.0
|
||||||
|
base_path: ./
|
||||||
permissions:
|
permissions:
|
||||||
checks: write
|
checks: write
|
||||||
contents: write
|
contents: write
|
||||||
packages: write
|
packages: write
|
||||||
pull-requests: read
|
pull-requests: read
|
||||||
jobs:
|
jobs:
|
||||||
build-publish:
|
build:
|
||||||
name: Build and Publish
|
name: Build
|
||||||
runs-on: self-hosted
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Set up Docker Buildx
|
- uses: actions/setup-node@v4
|
||||||
uses: docker/setup-buildx-action@v1
|
|
||||||
- name: Login to ghcr.io
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
node-version: lts
|
||||||
username: ${{ github.actor }}
|
cache: yarn
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
- name: Install dependencies
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
run: yarn install --immutable --network-timeout=300000
|
||||||
id: meta
|
- name: Build
|
||||||
uses: docker/metadata-action@v5
|
run: yarn build --base=${{ env.base_path }}
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
images: |
|
path: dist/
|
||||||
ghcr.io/${{ github.repository }}
|
name: dist-${{ env.upstream_version }}-${{ env.etke_version }}
|
||||||
registry.etke.cc/${{ github.repository }}
|
if-no-files-found: error
|
||||||
tags: |
|
retention-days: 1
|
||||||
type=raw,value=latest,enable=${{ github.ref_name == 'main' }}
|
compression-level: 0
|
||||||
type=raw,value=${{ env.upstream_version }}-${{ env.etke_version }},enable=${{ github.ref_name == 'main' }}
|
overwrite: true
|
||||||
- name: Build and push
|
include-hidden-files: true
|
||||||
uses: docker/build-push-action@v6
|
docker:
|
||||||
with:
|
name: Docker
|
||||||
platforms: linux/amd64,linux/arm64
|
needs: build
|
||||||
context: .
|
runs-on: self-hosted
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
|
|
||||||
build-deploy:
|
|
||||||
name: Build and Release
|
|
||||||
needs: build-publish
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: ghcr.io/${{ github.repository }} # as this job depends on the build-publish and build-publish always publishes the latest tag
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/download-artifact@v4
|
||||||
- name: Upload
|
with:
|
||||||
run: |
|
name: dist-${{ env.upstream_version }}-${{ env.etke_version }}
|
||||||
wget -O bunny-upload.tar.gz https://github.com/etkecc/bunny-upload/releases/download/${{ env.bunny_version }}/bunny-upload_Linux_x86_64.tar.gz
|
- name: Debug
|
||||||
tar -xzf bunny-upload.tar.gz
|
run: ls -lah
|
||||||
echo "${{ secrets.BUNNY_CONFIG }}" > bunny-config.yaml
|
# - name: Set up Docker Buildx
|
||||||
./bunny-upload -c bunny-config.yaml
|
# uses: docker/setup-buildx-action@v1
|
||||||
|
# - name: Login to ghcr.io
|
||||||
|
# uses: docker/login-action@v3
|
||||||
|
# with:
|
||||||
|
# registry: ghcr.io
|
||||||
|
# username: ${{ github.actor }}
|
||||||
|
# password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# - name: Extract metadata (tags, labels) for Docker
|
||||||
|
# id: meta
|
||||||
|
# uses: docker/metadata-action@v5
|
||||||
|
# with:
|
||||||
|
# images: |
|
||||||
|
# ghcr.io/${{ github.repository }}
|
||||||
|
# registry.etke.cc/${{ github.repository }}
|
||||||
|
# tags: |
|
||||||
|
# type=raw,value=latest,enable=${{ github.ref_name == 'main' }}
|
||||||
|
# type=raw,value=${{ env.upstream_version }}-${{ env.etke_version }},enable=${{ github.ref_name == 'main' }}
|
||||||
|
# - name: Build and push
|
||||||
|
# uses: docker/build-push-action@v6
|
||||||
|
# with:
|
||||||
|
# platforms: linux/amd64,linux/arm64
|
||||||
|
# context: .
|
||||||
|
# push: true
|
||||||
|
# tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
# labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
#
|
||||||
|
# build-deploy:
|
||||||
|
# name: Build and Release
|
||||||
|
# needs: build-publish
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# container: ghcr.io/${{ github.repository }} # as this job depends on the build-publish and build-publish always publishes the latest tag
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v4
|
||||||
|
# - name: Upload
|
||||||
|
# run: |
|
||||||
|
# wget -O bunny-upload.tar.gz https://github.com/etkecc/bunny-upload/releases/download/${{ env.bunny_version }}/bunny-upload_Linux_x86_64.tar.gz
|
||||||
|
# tar -xzf bunny-upload.tar.gz
|
||||||
|
# echo "${{ secrets.BUNNY_CONFIG }}" > bunny-config.yaml
|
||||||
|
# ./bunny-upload -c bunny-config.yaml
|
||||||
|
|
Loading…
Add table
Reference in a new issue