From ea8b996f18e37f4c2de84be81d5e2eb6d9289183 Mon Sep 17 00:00:00 2001 From: Tomohisa Kusano Date: Wed, 15 Feb 2023 20:51:44 -0800 Subject: [PATCH] Create docker-image.yml --- .github/workflows/docker-image.yml | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..42b6639 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,40 @@ +name: Docker Image CI/CD + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: siomiz/chrome + - + name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} +