continue overhaul #62
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: Main Branch CI | |
on: | |
push: | |
branches: main | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Out Repo | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Cache Docker layers | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./ | |
file: ./Dockerfile | |
builder: ${{ steps.buildx.outputs.name }} | |
push: true | |
tags: stevecorya/favre:latest | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
- name: Update Docker Hub description | |
uses: peter-evans/dockerhub-description@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
repository: stevecorya/favre | |
short-description: Asynchronous synchronization for named volumes | |
readme-filepath: ./DOCKER.md | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} | |
- name: Notify Telegram | |
uses: yanzay/notify-telegram@v0.1.0 | |
if: always() | |
with: | |
chat: ${{ secrets.TELEGRAM_USER_ID }} # user id or channel name secret | |
token: ${{ secrets.TELEGRAM_BOT_TOKEN }} # token secret | |
status: ${{ job.status }} # do not modify this line |