ci: migrate to buildkit
This commit is contained in:
parent
3fd6fca3fc
commit
3c4e21b69d
1 changed files with 13 additions and 18 deletions
|
@ -13,7 +13,7 @@ concurrency:
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
if: github.repository == 'teidesu/tei.su' # do not run on forks
|
if: github.repository == 'teidesu/tei.su' # do not run on forks
|
||||||
runs-on: docker-dind
|
runs-on: buildkit
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
packages: write
|
packages: write
|
||||||
|
@ -23,17 +23,11 @@ jobs:
|
||||||
|
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
env:
|
env:
|
||||||
DONATE_PAGE_DATA: ${{ vars.DONATE_PAGE_DATA }}
|
DONATE_PAGE_DATA: ${{ vars.DONATE_PAGE_DATA }}
|
||||||
run: |
|
run: echo "$DONATE_PAGE_DATA" > src/components/pages/PageDonate/data.json
|
||||||
echo "$DONATE_PAGE_DATA" > src/components/pages/PageDonate/data.json
|
|
||||||
/opt/start-dockerd.sh
|
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
run: /opt/registry-login.sh git.stupid.fish "${{ github.actor }}" "${{ secrets.PACKAGES_PAT }}"
|
||||||
with:
|
|
||||||
registry: git.stupid.fish
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.PACKAGES_PAT }}
|
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
|
@ -42,20 +36,21 @@ jobs:
|
||||||
images: git.stupid.fish/teidesu/tei.su
|
images: git.stupid.fish/teidesu/tei.su
|
||||||
tags: type=sha
|
tags: type=sha
|
||||||
flavor: latest=true
|
flavor: latest=true
|
||||||
|
sep-tags: ',name='
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
run: |
|
||||||
with:
|
buildctl build \
|
||||||
context: .
|
--frontend dockerfile.v0 \
|
||||||
push: true
|
--local context=. \
|
||||||
platforms: linux/amd64
|
--local dockerfile=. \
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
--opt platform=amd64 \
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
--output type=image,oci-mediatypes=true,compression=zstd,rewrite-timestamp=true,push=true,name=${{ steps.meta.outputs.tags }}
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: node22
|
runs-on: node22
|
||||||
needs: publish
|
needs: publish
|
||||||
steps:
|
steps:
|
||||||
- uses: https://github.com/teidesu/desu-deploy@main
|
- uses: https://github.com/teidesu/desu-deploy@d373e8ab554a95d222e3ced87e751dabbd3cfc57
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.DESU_DEPLOY_KEY }}
|
key: ${{ secrets.DESU_DEPLOY_KEY }}
|
||||||
server: ${{ secrets.KOI_IP }}
|
server: ${{ secrets.KOI_IP }}
|
||||||
|
|
Loading…
Reference in a new issue