From db48b47ef78707cbe2b684663d4d846d779150b0 Mon Sep 17 00:00:00 2001 From: k3forx Date: Fri, 7 May 2021 08:48:46 +0900 Subject: [PATCH] Add workflow for release --- .github/workflows/release.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..539c29c --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,32 @@ +name: release + +on: + pull_request: + paths: + - .github/workflows/release.yaml + # release: + # types: [released] + +jobs: + build: + # if: github.event.release.target_commitish == 'master' + name: Build and push docker image + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set image tag + run: echo "IMAGE_TAG=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: ./src + push: false + tags: kanata333/docker-hub-push:latest