2023-08-16 05:58:41 +08:00
|
|
|
name: Build App
|
|
|
|
|
|
|
|
on:
|
2023-08-17 00:29:58 +08:00
|
|
|
workflow_dispatch:
|
2023-08-16 20:48:32 +08:00
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
2023-08-16 05:58:41 +08:00
|
|
|
env:
|
|
|
|
DOCKER_BUILDKIT: 1
|
2023-08-16 20:48:32 +08:00
|
|
|
|
2023-08-16 05:58:41 +08:00
|
|
|
jobs:
|
|
|
|
build_image:
|
|
|
|
name: Build Image
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Install buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
with:
|
|
|
|
config: .github/buildkit.toml
|
|
|
|
|
|
|
|
- name: Login to Docker
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2023-08-16 20:48:32 +08:00
|
|
|
- name: Image Name
|
2023-08-16 05:58:41 +08:00
|
|
|
id: imagename
|
2023-08-16 06:10:52 +08:00
|
|
|
run: echo "name=ghcr.io/${GITHUB_REPOSITORY,,}/server" >> $GITHUB_OUTPUT
|
2023-08-16 05:58:41 +08:00
|
|
|
|
2023-08-16 20:48:32 +08:00
|
|
|
- name: Build Image
|
2023-08-16 05:58:41 +08:00
|
|
|
uses: docker/build-push-action@v3
|
|
|
|
with:
|
|
|
|
context: ./
|
|
|
|
pull: true
|
|
|
|
push: true
|
2023-08-24 02:59:01 +08:00
|
|
|
tags: ${{ steps.imagename.outputs.name }}:test
|