Skip to content

Merge pull request #6 from nicelizhi/dependabot/pip/cryptography-41.0.4 #9

Merge pull request #6 from nicelizhi/dependabot/pip/cryptography-41.0.4

Merge pull request #6 from nicelizhi/dependabot/pip/cryptography-41.0.4 #9

---
name: 'Docker Image'
on:
workflow_dispatch:
push:
branches:
- 'dev'
- 'master'
tags:
- 'v*.*.*'
paths-ignore:
- .github/**
- deploy/**
- docker-test/**
- docs/**
- .dockerignore
- .gitattributes
- .gitignore
- .lgtm.yml
- .whitesource
- .yarnrc
- docker-compose.yml
- docker-compose-test.yml
- LICENSE
- README.md
- SECURITY.md
env:
IMAGE_NAME: registry.ap-southeast-1.aliyuncs.com/kuops/gundns-admin # 镜像名称
TAG: ${{ github.sha }}
IMAGE_NAME_TAG: registry.ap-southeast-1.aliyuncs.com/kuops/gundns-admin:${{ github.sha }}
jobs:
build-and-push-docker-image:
name: Build Docker Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image and push
run: |
docker login --username=${{ secrets.DOCKER_USERNAME }} registry.ap-southeast-1.aliyuncs.com --password=${{ secrets.DOCKER_PASSWORD }}
echo "************ docker login end"
docker build -t gundns-admin:latest -f ./docker/Dockerfile .
echo "************ docker build end"
echo "************ docker images ps start"
docker images ps
echo "************ docker images ps end"
docker tag gundns-admin ${{ env.IMAGE_NAME_TAG }}
echo "************ docker tag end"
docker images
echo "************ docker images end"
docker push ${{ env.IMAGE_NAME_TAG }} # 推送
echo "************ docker push end"