upgrade to 1.23.16 #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image Build and Push CI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
environment: prod | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Extract Docker base image tag | |
id: extract_tag | |
run: | | |
TAG=$(grep '^FROM ' Dockerfile | awk -F ':' '{print $2}') | |
echo "TAG=$TAG" >> $GITHUB_ENV | |
- name: Build and push Docker image | |
run: | | |
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t realsidsun/replicator-kuma:$TAG --push . |