add test #318
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: Staging Branch CI | |
# For all pushes to the staging branch run the tests and push the image to the | |
# GitHub registry under an edge tag so we can use it for the nightly | |
# integration tests | |
on: | |
push: | |
branches: staging | |
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/agassi:staging | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} | |
- name: Notify Telegram | |
uses: yanzay/[email protected] | |
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 |