Compare commits

...

3 Commits
v1.1 ... main

Author SHA1 Message Date
seepine
a140801d37 fix: fix build-args 2025-03-23 17:37:46 +08:00
seepine
b0769a37de fix: add build args 2025-03-22 16:14:41 +08:00
seepine
714e077b61
fix: fix shell required 2025-02-17 23:50:39 +08:00

View File

@ -36,11 +36,16 @@ inputs:
description: "Push is a shorthand for --output=type=registry"
required: false
default: 'true'
build-args:
description: "Docker build args"
required: false
default: ''
runs:
using: 'composite'
steps:
- name: Set up Proxy env
shell: bash
run: |
echo "[$(date +'%Y-%m-%d %H:%M:%S')] ⚙️ Set up Proxy env"
if [ -n "${{ env.HTTP_PROXY }}" ]; then
@ -57,12 +62,14 @@ runs:
echo "no_proxy=${{ env.no_proxy }}"
- name: echo Set up QEMU
shell: bash
run: echo -e "\n[$(date +'%Y-%m-%d %H:%M:%S')] ⚙️ Set up QEMU"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: echo Set up Docker BuildX
shell: bash
run: echo -e "\n[$(date +'%Y-%m-%d %H:%M:%S')] ⚙️ Set up Docker BuildX"
- name: Set up Docker BuildX
@ -74,6 +81,7 @@ runs:
"env.no_proxy='${{ env.no_proxy }}'"
- name: echo Login to DockerHub
shell: bash
run: echo -e "\n[$(date +'%Y-%m-%d %H:%M:%S')] ⚙️ Login to DockerHub"
if: ${{ inputs.username != '' }}
@ -90,6 +98,7 @@ runs:
NO_PROXY: ${{ env.no_proxy }}
- name: echo Cache docker build
shell: bash
run: echo -e "\n[$(date +'%Y-%m-%d %H:%M:%S')] ⚙️ Cache docker build"
- name: Cache docker build
@ -99,10 +108,12 @@ runs:
key: ${{ runner.os }}-docker-build-cache
- name: echo Build and push
shell: bash
run: echo -e "\n[$(date +'%Y-%m-%d %H:%M:%S')] ⚙️ Build and push"
- name: Get docker meta
id: meta
shell: bash
run: |
if [ -n "${{ inputs.tags }}" ]; then
echo TAGS=$(echo "${{ inputs.tags }}" | tr '\n' ',' | sed 's/,$//') >> $GITHUB_OUTPUT
@ -119,6 +130,7 @@ runs:
fi
- name: echo Get docker meta
shell: bash
run: |
echo -e "\n[$(date +'%Y-%m-%d %H:%M:%S')] ⚙️ Get docker meta"
echo TAGS=${{ steps.meta.outputs.TAGS }}
@ -137,3 +149,4 @@ runs:
build-args: |
"http_proxy='${{ env.http_proxy }}'"
"https_proxy='${{ env.https_proxy }}'"
${{ inputs.build-args }}