File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed
Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ # See. https://docs.docker.com/build/ci/github-actions/multi-platform/
2+ name : Build and Push Docker Image
3+
4+ on :
5+ workflow_dispatch :
6+ inputs :
7+ version :
8+ description : " Docker Image Version (e.g., 1.0.0). Leave empty for 'latest' only."
9+ required : false
10+ default : " "
11+
12+ jobs :
13+ build-and-push :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v3
19+
20+ - name : Log in to DockerHub
21+ uses : docker/login-action@v2
22+ with :
23+ username : ${{ vars.DOCKERHUB_USERNAME }}
24+ password : ${{ secrets.DOCKERHUB_PASSWORD }}
25+
26+ - name : Set up Docker Buildx
27+ uses : docker/setup-buildx-action@v3
28+
29+ - name : Prepare tags
30+ id : prepare_tags
31+ run : |
32+ if [ -z "${{ github.event.inputs.version }}" ]; then
33+ echo "TAGS=latest" >> $GITHUB_ENV
34+ else
35+ echo "TAGS=latest,${{ github.event.inputs.version }}" >> $GITHUB_ENV
36+ fi
37+
38+ - name : Build and Push Docker Image
39+ uses : docker/build-push-action@v6
40+ with :
41+ context : .
42+ platforms : linux/amd64,linux/arm64
43+ push : true
44+ tags : daido1976/aws-lambda-function-url-emulator:${{ steps.prepare_tags.outputs.TAGS }}
File renamed without changes.
You can’t perform that action at this time.
0 commit comments