mirror of
https://github.com/NapNeko/NapCat-Docker.git
synced 2025-12-19 06:30:12 +08:00
chore: drop debug
This commit is contained in:
parent
c81e3f2281
commit
c35e917675
38
.github/workflows/debug.yml
vendored
38
.github/workflows/debug.yml
vendored
@ -1,38 +0,0 @@
|
|||||||
name: debug
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-dockerhub:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Get artifacts
|
|
||||||
run: |
|
|
||||||
bash get_artifacts.sh ${{ secrets.GITHUB_TOKEN }} $(curl "https://api.github.com/repos/NapNeko/NapCatQQ/releases/latest" | jq -r '.tag_name')
|
|
||||||
- name: Set up Docker buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
- name: Run buildx and push
|
|
||||||
env:
|
|
||||||
DOCKER_REPO: mlikiowa/napcat-docker
|
|
||||||
GITHUB_REPO: NapNeko/NapCatQQ
|
|
||||||
run: |
|
|
||||||
TAG=$(curl "https://api.github.com/repos/NapNeko/NapCatQQ/releases/latest" | jq -r '.tag_name')
|
|
||||||
docker buildx build \
|
|
||||||
--build-arg LINK=$LINK \
|
|
||||||
--output "type=image,push=true" \
|
|
||||||
--platform linux/amd64,linux/arm64 \
|
|
||||||
--tag ${DOCKER_REPO}:$TAG \
|
|
||||||
--tag ${DOCKER_REPO}:latest-test \
|
|
||||||
--file ./Dockerfile \
|
|
||||||
.
|
|
||||||
- name: Docker Hub logout
|
|
||||||
if: always()
|
|
||||||
run: docker logout
|
|
||||||
127
.github/workflows/docker-publish.yml
vendored
127
.github/workflows/docker-publish.yml
vendored
@ -1,119 +1,38 @@
|
|||||||
name: ci
|
name: docker-publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
# push:
|
|
||||||
# branches:
|
|
||||||
# - "main"
|
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY_IMAGE: mlikiowa/napcat-docker
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
publish-dockerhub:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform:
|
|
||||||
- linux/amd64
|
|
||||||
- linux/arm64
|
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Prepare
|
|
||||||
run: |
|
|
||||||
platform=${{ matrix.platform }}
|
|
||||||
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
-
|
- name: Get artifacts
|
||||||
name: Docker meta
|
run: |
|
||||||
id: meta
|
bash get_artifacts.sh ${{ secrets.GITHUB_TOKEN }} $(curl "https://api.github.com/repos/NapNeko/NapCatQQ/releases/latest" | jq -r '.tag_name')
|
||||||
uses: docker/metadata-action@v5
|
- name: Set up Docker buildx
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY_IMAGE }}
|
|
||||||
tags: |
|
|
||||||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
|
|
||||||
-
|
|
||||||
name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
-
|
- name: Login to Docker Hub
|
||||||
name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
-
|
# Fork from https://github.com/koishijs/boilerplate/blob/master/.github/workflows/docker.yml
|
||||||
name: Get artifacts
|
- name: Run buildx and push
|
||||||
env:
|
env:
|
||||||
ARCH_NC: ${{ matrix.platform }}
|
DOCKER_REPO: mlikiowa/napcat-docker
|
||||||
|
GITHUB_REPO: NapNeko/NapCatQQ
|
||||||
run: |
|
run: |
|
||||||
bash get_artifacts.sh ${{ secrets.GITHUB_TOKEN }}
|
TAG=$(curl "https://api.github.com/repos/NapNeko/NapCatQQ/releases/latest" | jq -r '.tag_name')
|
||||||
ls -lh
|
docker buildx build \
|
||||||
-
|
--output "type=image,push=true" \
|
||||||
name: Build and push by digest
|
--platform linux/amd64,linux/arm64 \
|
||||||
id: build
|
--tag ${DOCKER_REPO}:$TAG \
|
||||||
uses: docker/build-push-action@v5
|
--tag ${DOCKER_REPO}:latest \
|
||||||
with:
|
--file ./Dockerfile \
|
||||||
context: .
|
.
|
||||||
platforms: ${{ matrix.platform }}
|
- name: Docker Hub logout
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
if: always()
|
||||||
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
run: docker logout
|
||||||
-
|
|
||||||
name: Export digest
|
|
||||||
run: |
|
|
||||||
mkdir -p /tmp/digests
|
|
||||||
digest="${{ steps.build.outputs.digest }}"
|
|
||||||
touch "/tmp/digests/${digest#sha256:}"
|
|
||||||
-
|
|
||||||
name: Upload digest
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: digests-${{ env.PLATFORM_PAIR }}
|
|
||||||
path: /tmp/digests/*
|
|
||||||
if-no-files-found: error
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
merge:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- build
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Download digests
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
path: /tmp/digests
|
|
||||||
pattern: digests-*
|
|
||||||
merge-multiple: true
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY_IMAGE }}
|
|
||||||
tags: |
|
|
||||||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
|
|
||||||
-
|
|
||||||
name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
-
|
|
||||||
name: Create manifest list and push
|
|
||||||
working-directory: /tmp/digests
|
|
||||||
run: |
|
|
||||||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
|
||||||
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
|
|
||||||
-
|
|
||||||
name: Inspect image
|
|
||||||
run: |
|
|
||||||
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
|
|
||||||
Loading…
Reference in New Issue
Block a user