Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shczhen committed Apr 21, 2022
1 parent ebfbe60 commit c4f6cb0
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,26 @@ name: Docker Image CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches: [main]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Login to Container Registry
uses: docker/login-action@v1
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
- name: Login to Container Registry
uses: docker/login-action@v1
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
${{ secrets.DOCKER_REGISTRY }}/tidb-community-book:${{ runner.os }}-${{ github.sha }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
${{ secrets.DOCKER_REGISTRY }}/tidb-community-book:${{ runner.os }}-${{ github.sha }}

0 comments on commit c4f6cb0

Please sign in to comment.