build TS3AudioBot #36
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: build TS3AudioBot | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 5" | |
push: | |
branches: | |
- main | |
paths: | |
- TS3AudioBot/dev/Docker/** | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
push: | |
name: "Build and push TS3AudioBot docker image" | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: docker/setup-qemu-action@v1 | |
- uses: docker/setup-buildx-action@v1 | |
with: | |
version: "v0.5.1" | |
buildkitd-flags: --debug | |
- uses: docker/login-action@v1 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.REGISTRY_TOKEN }} | |
- name: convert repo name to lowercase | |
run: | | |
echo "IMAGE_NAME_LC=${IMAGE_NAME,,}" >>${GITHUB_ENV} | |
env: | |
IMAGE_NAME: '${{ github.repository }}' # contains <owner>/<repo_name> | |
- uses: docker/build-push-action@v2 | |
with: | |
context: ./TS3AudioBot/dev/Docker | |
file: ./TS3AudioBot/dev/Docker/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}:ts3audiobot |