Upgrade Docker actions and fix version environment

Updated Docker actions versions and fixed environment variable setting.
This commit is contained in:
starry
2026-04-22 00:38:30 +08:00
committed by GitHub
parent 7e06ef67e7
commit 5270504197

View File

@@ -6,7 +6,6 @@ on:
description: '镜像标签'
required: true
default: 'latest'
jobs:
build:
runs-on: ubuntu-latest
@@ -16,21 +15,16 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set version from input
run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
- name: Build and push Docker image
run: |
@@ -40,4 +34,4 @@ jobs:
--build-arg VERSION=${{ env.VERSION }} \
.
env:
GHCR_PUBLIC: true
VERSION: ${{ github.event.inputs.version }}