From 44dce38946a328effb7ba2033e5b42d30fbe27d8 Mon Sep 17 00:00:00 2001 From: Beeant Date: Sun, 5 Jun 2022 18:52:01 +0800 Subject: [PATCH] Update docker-image.yml --- .github/workflows/docker-image.yml | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index dfa8b2f..27d7d3f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -5,6 +5,7 @@ on: branches: [ "main" ] pull_request: branches: [ "main" ] + workflow_dispatch: jobs: @@ -14,20 +15,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag xbeeant/oo-unlimit:$(date +%s) - - name: Login to DockerHub - uses: docker/login-action@v2.0.0 + - name: Build and push Docker images + uses: docker/build-push-action@v1 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKER_TOKEN }} - - name: Build image and push to Docker Hub and GitHub Container Registry - uses: docker/build-push-action@v3.0.0 - with: - # relative path to the place where source code with Dockerfile is located - context: ./ - # Note: tags has to be all lower-case - tags: | - xbeeant/devdocs:latest - # build on feature branches, push only on main branch - push: ${{ github.ref == 'refs/heads/main' }} + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: xbeeant/oo-unlimit + tags: 7.1.1.23.$(date +%s)