Skip to content

3.2

3.2 #13

Workflow file for this run

name: Publish Docker
on:
release:
types: [published]
env:
REPO: hlf01/telegram-onedrive
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
if: github.repository_owner == 'hlf20010508'
steps:
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push image
uses: docker/build-push-action@v2
with:
file: Dockerfile
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.REPO }}:${{ steps.get_version.outputs.VERSION }},${{ env.REPO }}:latest