test docker build

This commit is contained in:
Singee 2023-10-17 17:00:24 +08:00
parent 67c64e71c8
commit 3d9ad0024a
No known key found for this signature in database
GPG Key ID: 4EC3FD10E03041D7

View File

@ -9,6 +9,8 @@ on:
name: name:
description: 'reason' description: 'reason'
required: false required: false
permissions:
packages: write
jobs: jobs:
push_to_registries: push_to_registries:
name: Push Docker image to multiple registries name: Push Docker image to multiple registries
@ -25,12 +27,6 @@ jobs:
git describe --tags > VERSION git describe --tags > VERSION
- name: Log in to Docker Hub - name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to the Container registry
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
registry: ghcr.io registry: ghcr.io
@ -41,9 +37,7 @@ jobs:
id: meta id: meta
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: | images: ghcr.io/${{ github.repository }}
justsong/one-api
ghcr.io/${{ github.repository }}
- name: Build and push Docker images - name: Build and push Docker images
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
@ -51,4 +45,4 @@ jobs:
context: . context: .
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}