Merge pull request #1 from maheshkasabe/master #1
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: Docker image builder | |
on: [push, pull_request] # Runs when the someone pushes changes to branch or creates a pull request | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# - name: login to docker hub | |
# uses: docker/login-action@v2 | |
# with: | |
# username: ${{ secrets.DOCKER_USERNAME }} | |
# password: ${{ secrets.DOCKER_TOKEN }} | |
# - name: Set Tag | |
# id: vars | |
# if: ${{ github.ref == 'refs/heads/master' }} | |
# run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Create healthcheck docker image | |
run: docker build -t hook . | |
# - name: Push image to Dockerhub | |
# if: ${{ github.ref == 'refs/heads/master' }} | |
# run: | | |
# docker tag hook openkruise/hook:latest | |
# docker push openkruise/hook:latest | |
# docker push openkruise/hook:${{ steps.vars.outputs.sha_short }} |