Skip to content

Build Docker Image

Build Docker Image #33

name: Build Docker Image
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
push:
branches:
- master
paths:
- LinkRouter/**
env:
GH_TOKEN: ${{secrets.GH_TOKEN}}
jobs:
push:
name: "Build Docker Image"
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Qemu
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_TOKEN }}
- uses: docker/build-push-action@v5
with:
context: ./
file: ./LinkRouter/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/linkrouter:latest,ghcr.io/${{ github.repository_owner }}/linkrouter:v${{ github.run_number }}