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
on: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
docker: | |
name: Publish - Docker Hub | |
runs-on: ubuntu-latest | |
env: | |
REPO: ${{ secrets.DOCKER_REPO }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Login to Docker Hub | |
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }} | |
- name: Build Docker image | |
run: docker build -t $REPO:latest -t $REPO:${GITHUB_SHA::8} . | |
- name: Publish Docker image | |
run: docker push $REPO | |
redeploy: | |
name: Redeploy webhook call | |
runs-on: ubuntu-latest | |
needs: [docker] | |
steps: | |
- name: Deploy docker container webhook | |
uses: joelwmale/webhook-action@master | |
env: | |
WEBHOOK_URL: ${{ secrets.DEPLOY_WEBHOOK_URL }} | |
data: "{ 'myField': 'myFieldValue'}" |