Skip to content

Update README.md (#13) #23

Update README.md (#13)

Update README.md (#13) #23

name: Build and Deploy Image
on:
push:
branches:
- "master"
jobs:
build_and_release:
strategy:
matrix:
flavor: [ debian, alpine ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Registry
uses: docker/login-action@v2
with:
registry: cr.jbonet.xyz
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
cr.jbonet.xyz/jbonet/tvhstats
tags: |
type=raw,value=latest,enable=${{ matrix.flavor == 'debian' }}
${{ matrix.flavor }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: ./docker/${{ matrix.flavor }}/Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}