mirror of
https://github.com/seejohnrun/haste-server
synced 2025-08-22 07:03:08 -07:00
Create Build Script for Docker Container
This commit is contained in:
parent
7286385833
commit
b36af7996c
1 changed files with 40 additions and 0 deletions
40
.github/workflows/build.yaml
vendored
Normal file
40
.github/workflows/build.yaml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
name: Build Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
env:
|
||||
GHCR_REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ${{ env.GHCR_REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
env:
|
||||
DOCKER_IMAGE: ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/armhf,linux/arm64
|
||||
push: true
|
||||
tags: ${{ env.DOCKER_IMAGE }
|
Loading…
Add table
Add a link
Reference in a new issue