build(deps): bump pillow from 10.2.0 to 10.3.0 #614
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
# This is a basic workflow to help you get started with Actions | |
name: Docker | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
workflow_dispatch: # on button click | |
pull_request: # PRs | |
push: | |
branches: | |
- master | |
paths: | |
- "**.py" | |
- "requirements*.txt" | |
- ".github/workflows/docker.yml" | |
- "Dockerfile" | |
- "**.po" | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
name: Build docker image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@master | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to GitHub Container Registry | |
if: ${{ github.event_name == 'push' }} | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v1 | |
with: | |
image: tonistiigi/binfmt:latest | |
platforms: all | |
- name: Query Tag | |
id: tag | |
uses: jimschubert/query-tag-action@v2 | |
- name: Publish to Registry | |
if: always() | |
uses: docker/build-push-action@v2 | |
with: | |
tags: ghcr.io/octo-tg-bot/octotgbot:latest | |
build-args: | | |
CI=true | |
DESCRIBE=${{steps.tag.outputs.tag}} | |
push: ${{ github.event_name == 'push' }} | |
target: release | |
platforms: linux/amd64 | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
deployment: | |
name: Deploy docker image | |
needs: build | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' }} | |
steps: | |
- name: Install jq and curl | |
run: sudo apt update && sudo apt install jq curl | |
- name: Start deployment | |
uses: bobheadxi/deployments@master | |
id: deployment | |
with: | |
step: start | |
token: ${{ secrets.GITHUB_TOKEN }} | |
env: telegram | |
- name: Send Telegram message about started deployment | |
id: sendMsg | |
run: | | |
export message_id=$(curl https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage -d chat_id=${{ secrets.TELEGRAM_CHAT }} -d text="🔄 Deployment started for commit ${{ github.sha }}" | jq .result.message_id) | |
echo "::set-output name=message_id::$message_id" | |
- uses: actions/checkout@v2 | |
- name: Sentry Release | |
uses: getsentry/[email protected] | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
with: | |
environment: prod | |
ignore_missing: true | |
ignore_empty: true | |
- name: Send request to Watchtower HTTP API | |
run: 'curl -H "Authorization: Bearer ${{ secrets.WT_TOKEN }}" http://${{ secrets.WT_HOST }}:${{ secrets.WT_PORT }}/v1/update' | |
- name: Update deployment status | |
uses: bobheadxi/[email protected] | |
if: always() | |
with: | |
step: finish | |
token: ${{ secrets.GITHUB_TOKEN }} | |
status: ${{ job.status }} | |
deployment_id: ${{ steps.deployment.outputs.deployment_id }} | |
- name: Edit Telegram message about finished deployment | |
run: curl https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/editMessageText -d chat_id=${{ secrets.TELEGRAM_CHAT }} -d text="✅ Deployment finished for commit ${{ github.sha }}" -d message_id=${{ steps.sendMsg.outputs.message_id }} |