mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
Create docker.yml
This commit is contained in:
@@ -0,0 +1,42 @@
|
|||||||
|
name: Build Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
|
||||||
|
env:
|
||||||
|
APP_NAME: telegram-twitter-media-bot
|
||||||
|
DOCKERHUB_REPO: yoursfunny/telegram-twitter-media-bot
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
-
|
||||||
|
name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: Generate APP Version
|
||||||
|
run: echo APP_VERSION=`git describe --tags --always` >> $GITHUB_ENV
|
||||||
|
-
|
||||||
|
name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
platforms: |
|
||||||
|
linux/amd64
|
||||||
|
build-args: |
|
||||||
|
APP_NAME=${{ env.APP_NAME }}
|
||||||
|
APP_VERSION=${{ env.APP_VERSION }}
|
||||||
|
tags: |
|
||||||
|
${{ env.DOCKERHUB_REPO }}:latest
|
||||||
|
${{ env.DOCKERHUB_REPO }}:${{ env.APP_VERSION }}
|
||||||
Reference in New Issue
Block a user