rebase to ubuntu 22.04 (#22) #298
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: buildx | |
on: | |
push: | |
branches: | |
- 'ubuntu' | |
pull_request: | |
workflow_dispatch: | |
env: | |
DOCKERHUB_USER: wiserain | |
IMAGE_NAME: wiserain/tvhbase | |
jobs: | |
build-tvhbase-ubuntu: | |
runs-on: ubuntu-22.04 | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Initial Buildx | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: Dockerfile | |
tags: ${{ env.IMAGE_NAME }}:testing | |
platforms: linux/amd64 | |
- | |
name: Login to docker.io | |
uses: docker/login-action@v3 | |
if: github.actor == github.event.repository.owner.login | |
with: | |
username: ${{ env.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Login to ghcr.io | |
uses: docker/login-action@v3 | |
if: github.actor == github.event.repository.owner.login | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Buildx and Push | |
uses: docker/build-push-action@v5 | |
if: github.actor == github.event.repository.owner.login | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64 | |
push: true | |
tags: | | |
${{ env.IMAGE_NAME }}:testing-ubuntu | |
ghcr.io/${{ env.IMAGE_NAME }}:testing-ubuntu | |
- | |
name: Send Notification | |
uses: sarisia/actions-status-discord@v1 | |
if: failure() && github.actor == github.event.repository.owner.login | |
with: | |
webhook: ${{ secrets.DISCORD_WEBHOOK }} | |
status: ${{ job.status }} | |
description: | | |
${{ env.IMAGE_NAME }}:testing-ubuntu | |
ghcr.io/${{ env.IMAGE_NAME }}:testing-ubuntu |