Update docker-image.yml #17
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: Build and Push Docker Image to Docker Hub | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
REPO_BASE: ${{ vars.REPO_BASE }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: Build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Show base | |
run: echo "$GITHUB_CONTEXT" | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Login ZP Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ vars.ZPDOCKER_REGISTRY }} | |
username: ${{ vars.ZPDOCKER_USERNAME }} | |
password: ${{ secrets.ZPDOCKER_PASSWORD }} | |
- name: Build the Docker image | |
run: ./k8s/build.sh v1.0.0 |