Skip to content

readme: trying to add a fancy telegram icon #36

readme: trying to add a fancy telegram icon

readme: trying to add a fancy telegram icon #36

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
paths-ignore:
- './*.md'
tags:
- 'v[0-9]+.[0-9]+.*'
branches:
- master
env:
DOCKERHUB_USERNAME: ${{ vars.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
GITHUB_REPO: cyxou/firefly-iii-telegram-bot
FORCE_COLOR: 1
jobs:
release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Set up QEMU for multiplatform builds
id: qemu
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:latest
platforms: all
- uses: actions/checkout@v3
- name: Put back the git branch into git (Earthly uses it for tagging)
run: |
branch=""
if [ -n "$GITHUB_HEAD_REF" ]; then
branch="$GITHUB_HEAD_REF"
else
branch="${GITHUB_REF##*/}"
fi
git checkout -b "$branch" || true
- name: Download Earthly
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.7.8/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Earthly version
run: earthly --version
- name: Docker Login
run: docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_TOKEN
- name: Build and push docker image
run: |
earthly --ci --push +build-and-release \
--GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
--DOCKERHUB_REPO=$GITHUB_REPO \
--DOCKERHUB_USERNAME=$DOCKERHUB_USERNAME \
--DOCKERHUB_ACCESS_TOKEN=$DOCKERHUB_TOKEN \
--RELEASE_VERSION=${GITHUB_REF:10}
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ env.DOCKERHUB_TOKEN }}
repository: ${{ env.GITHUB_REPO }}
short-description: ${{ github.event.repository.description }}
- name: Send telegram message on release
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_GROUP_ID }}
token: ${{ secrets.TELEGRAM_RELEASE_NOTIFIER_BOT_TOKEN }}
message: |
🚀 New version has just been released: ${{ github.ref }}
See changes here: https://github.com/cyxou/${{ github.repository }}/releases/tag/${{ github.ref }}