feat: Add CI environment setup and verification workflows with Docker support
Some checks failed
Test / test-frontend (pull_request) Successful in 43s
Test / lint-frontend (pull_request) Successful in 47s
Verify / get-ci-image (pull_request) Successful in 47s
Test / frontend-build (pull_request) Successful in 1m29s
Verify / verify-generated-db-entities (pull_request) Has been cancelled
Test / test-crates (pull_request) Has been cancelled
Test / lint-crates (pull_request) Has been cancelled
Some checks failed
Test / test-frontend (pull_request) Successful in 43s
Test / lint-frontend (pull_request) Successful in 47s
Verify / get-ci-image (pull_request) Successful in 47s
Test / frontend-build (pull_request) Successful in 1m29s
Verify / verify-generated-db-entities (pull_request) Has been cancelled
Test / test-crates (pull_request) Has been cancelled
Test / lint-crates (pull_request) Has been cancelled
This commit is contained in:
54
.github/workflows/build-ci.yaml
vendored
Normal file
54
.github/workflows/build-ci.yaml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
name: Build CI Environment
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
image_tag:
|
||||
description: 'Tag for the CI image (e.g., latest)'
|
||||
required: true
|
||||
default: 'latest'
|
||||
|
||||
env:
|
||||
# OVERRIDE_REGISTRY can be set as a secret to override the default registry (e.g., for testing with a private registry). Else '' will be used, which defaults to ghcr.io for github.com and the GitHub server domain for self-hosted GitHub instances.
|
||||
OVERRIDE_REGISTRY: ${{ secrets.OVERRIDE_REGISTRY }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
concurrency:
|
||||
group: build-ci
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-ci-image:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup CI metadata
|
||||
id: setup
|
||||
uses: ./.github/actions/setup-ci-metadata
|
||||
with:
|
||||
registry: ${{ env.OVERRIDE_REGISTRY }}
|
||||
image_tag: ${{ github.event.inputs.image_tag }}
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: ${{ steps.setup.outputs.registry }}
|
||||
username: ${{ secrets.GITHUB_USERNAME || github.actor }}
|
||||
password: ${{ secrets.OVERRIDE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image for CI
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: .github/docker/ci.Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
${{ steps.setup.outputs.image_tag }}
|
||||
${{ steps.setup.outputs.latest_tag }}
|
||||
Reference in New Issue
Block a user