![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.17.0 to 6.18.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](1dc7386353...263435318d
)
---
updated-dependencies:
- dependency-name: docker/build-push-action
dependency-version: 6.18.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
122 lines
3.6 KiB
YAML
122 lines
3.6 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
tags: [ "v*" ]
|
|
env:
|
|
bunny_version: v0.1.0
|
|
base_path: ./
|
|
permissions:
|
|
checks: write
|
|
contents: write
|
|
packages: write
|
|
pull-requests: read
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
cache: yarn
|
|
- name: Install dependencies
|
|
run: yarn install --immutable --network-timeout=300000
|
|
- name: Build
|
|
run: yarn build --base=${{ env.base_path }}
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
path: dist/
|
|
name: dist
|
|
if-no-files-found: error
|
|
retention-days: 1
|
|
compression-level: 0
|
|
overwrite: true
|
|
include-hidden-files: true
|
|
|
|
docker:
|
|
name: Docker
|
|
needs: build
|
|
runs-on: self-hosted
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: dist
|
|
path: dist/
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
|
|
- name: Login to ghcr.io
|
|
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Login to hub.docker.com
|
|
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
|
|
with:
|
|
username: etkecc
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
|
|
with:
|
|
images: |
|
|
${{ github.repository }}
|
|
ghcr.io/${{ github.repository }}
|
|
registry.etke.cc/${{ github.repository }}
|
|
tags: |
|
|
type=raw,value=latest,enable=${{ github.ref_name == 'main' }}
|
|
type=semver,pattern={{raw}}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
|
|
with:
|
|
platforms: linux/amd64,linux/arm64
|
|
context: .
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
cdn:
|
|
name: CDN
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: dist
|
|
path: dist/
|
|
- 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
|
|
|
|
github-release:
|
|
name: Github Release
|
|
needs: build
|
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: dist
|
|
path: dist/
|
|
- name: Prepare release
|
|
run: |
|
|
mv dist synapse-admin
|
|
tar chvzf synapse-admin.tar.gz synapse-admin
|
|
- uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
|
|
with:
|
|
files: synapse-admin.tar.gz
|
|
generate_release_notes: true
|
|
make_latest: "true"
|
|
draft: false
|
|
prerelease: false
|