Skip to content

Build and Push Docker Images #24

Build and Push Docker Images

Build and Push Docker Images #24

name: Build and Push Docker Images
on:
workflow_dispatch:
inputs:
push_images:
description: 'Push Docker images'
required: false
default: false
type: boolean
build_debian11_python_shadowsocksr:
description: 'Build debian11-python-shadowsocksr'
required: false
default: false
type: boolean
build_debian12_nodejs_typescript_salesforcecli:
description: 'Build debian12-nodejs-typescript-salesforcecli'
required: false
default: false
type: boolean
build_debian12_nodejs_typescript_salesforcecli_chromium:
description: 'Build debian12-nodejs-typescript-salesforcecli-chromium'
required: false
default: false
type: boolean
build_debian12_serverstatusrust_client:
description: 'Build debian12-serverstatusrust-client'
required: false
default: false
type: boolean
build_debian12_serverstatusrust_server:
description: 'Build debian12-serverstatusrust-server'
required: false
default: false
type: boolean
jobs:
build-and-push:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: ${{ fromJSON(github.event.inputs.push_images) }}
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Get current date
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- name: Build and push Docker image for debian11-python-shadowsocksr
if: ${{ fromJSON(github.event.inputs.build_debian11_python_shadowsocksr) }}
uses: docker/build-push-action@v6
with:
context: ./debian11-python-shadowsocksr
file: ./debian11-python-shadowsocksr/Dockerfile
push: ${{ fromJSON(github.event.inputs.push_images) }}
tags: eric2369/debian11-python-shadowsocksr:${{ env.DATE }},eric2369/debian11-python-shadowsocksr:latest
platforms: linux/amd64,linux/arm64
- name: Build and push Docker image for debian12-nodejs-typescript-salesforcecli
if: ${{ fromJSON(github.event.inputs.build_debian12_nodejs_typescript_salesforcecli) }}
uses: docker/build-push-action@v6
with:
context: ./debian12-nodejs-typescript-salesforcecli
file: ./debian12-nodejs-typescript-salesforcecli/Dockerfile
push: ${{ fromJSON(github.event.inputs.push_images) }}
tags: eric2369/debian12-nodejs-typescript-salesforcecli:${{ env.DATE }},eric2369/debian12-nodejs-typescript-salesforcecli:latest
platforms: linux/amd64,linux/arm64
- name: Build and push Docker image for debian12-nodejs-typescript-salesforcecli-chromium
if: ${{ fromJSON(github.event.inputs.build_debian12_nodejs_typescript_salesforcecli_chromium) }}
uses: docker/build-push-action@v6
with:
context: ./debian12-nodejs-typescript-salesforcecli-chromium
file: ./debian12-nodejs-typescript-salesforcecli-chromium/Dockerfile
push: ${{ fromJSON(github.event.inputs.push_images) }}
tags: eric2369/debian12-nodejs-typescript-salesforcecli-chromium:${{ env.DATE }},eric2369/debian12-nodejs-typescript-salesforcecli-chromium:latest
platforms: linux/amd64,linux/arm64
- name: Build and push Docker image for debian12-serverstatusrust-client
if: ${{ fromJSON(github.event.inputs.build_debian12_serverstatusrust_client) }}
uses: docker/build-push-action@v6
with:
context: ./debian12-serverstatusrust-client
file: ./debian12-serverstatusrust-client/Dockerfile
push: ${{ fromJSON(github.event.inputs.push_images) }}
tags: eric2369/debian12-serverstatusrust-client:${{ env.DATE }},eric2369/debian12-serverstatusrust-client:latest
platforms: linux/amd64,linux/arm64
- name: Build and push Docker image for debian12-serverstatusrust-server
if: ${{ fromJSON(github.event.inputs.build_debian12_serverstatusrust_server) }}
uses: docker/build-push-action@v6
with:
context: ./debian12-serverstatusrust-server
file: ./debian12-serverstatusrust-server/Dockerfile
push: ${{ fromJSON(github.event.inputs.push_images) }}
tags: eric2369/debian12-serverstatusrust-server:${{ env.DATE }},eric2369/debian12-serverstatusrust-server:latest
platforms: linux/amd64,linux/arm64