mirror of
https://github.com/WilliamPeterMatthew/sslocal-manager-alpine.git
synced 2026-02-27 09:53:28 +08:00
43 lines
856 B
YAML
43 lines
856 B
YAML
name: Build Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
TZ: Asia/Shanghai
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
attestations: write
|
|
id-token: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: master
|
|
|
|
- uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Extract current date
|
|
id: extract-date
|
|
run: |
|
|
DATE=$(date +%Y%m%d)
|
|
echo "date=$DATE" >> $GITHUB_OUTPUT
|
|
|
|
- name: Build
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
platforms: linux/amd64,linux/arm64
|
|
push: false
|
|
tags: |
|
|
sslocal-manager-test:latest
|
|
sslocal-manager-test:${{ steps.extract-date.outputs.date }}
|