mirror of
https://github.com/GMWalletApp/epusdt.git
synced 2026-07-07 02:06:16 +00:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: docker-alpine-epusdt
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
|
|
env:
|
|
IMAGE_NAME: epusdt
|
|
|
|
jobs:
|
|
push-docker-hub:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
TZ: Asia/Shanghai
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Compute Build Metadata
|
|
id: meta
|
|
shell: bash
|
|
run: |
|
|
echo "version=main-${GITHUB_SHA}" >> "$GITHUB_OUTPUT"
|
|
echo "commit=${GITHUB_SHA}" >> "$GITHUB_OUTPUT"
|
|
echo "date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Login
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build And Push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
push: true
|
|
build-args: |
|
|
VERSION=${{ steps.meta.outputs.version }}
|
|
COMMIT=${{ steps.meta.outputs.commit }}
|
|
DATE=${{ steps.meta.outputs.date }}
|
|
tags: |
|
|
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:alpine
|