Update .gitea/workflows/ci_workflows.yml
This commit is contained in:
parent
a2bc2f085d
commit
33c2b95125
@ -8,28 +8,15 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.10'
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r requirements.txt
|
|
||||||
|
|
||||||
- name: Run Unit Tests
|
|
||||||
run: python -m unittest discover -s . -p 'test_*.py'
|
|
||||||
|
|
||||||
build_and_push:
|
build_and_push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test # Ensures `build_and_push` runs only if `test` succeeds
|
needs: setup # Ensures `build_and_push` runs only if `setup` succeeds
|
||||||
env:
|
env:
|
||||||
DOCKER_HOST: unix:///var/run/docker.sock
|
DOCKER_HOST: unix:///var/run/docker.sock
|
||||||
steps:
|
steps:
|
||||||
@ -42,10 +29,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Configure Docker Buildx
|
- name: Setup Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
with:
|
||||||
driver: docker
|
config-inline: |
|
||||||
|
[registry."centurion-version-control.default.svc.cluster.local:3000"]
|
||||||
|
http = true
|
||||||
|
insecure = true
|
||||||
|
|
||||||
- name: Auth to Container Registry
|
- name: Auth to Container Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
@ -54,9 +44,9 @@ jobs:
|
|||||||
username: ${{ secrets.CI_USER }}
|
username: ${{ secrets.CI_USER }}
|
||||||
password: ${{ secrets.CI_USER_TOKEN }}
|
password: ${{ secrets.CI_USER_TOKEN }}
|
||||||
|
|
||||||
- name: Pull activity_block_wrapper Image
|
- name: Pull db_activity_wrapper Image
|
||||||
run: |
|
run: |
|
||||||
docker pull centurion-version-control.default.svc.cluster.local:3000/centurion/system/blocks-activity-wrapper:latest
|
docker pull centurion-version-control.default.svc.cluster.local:3000/centurion/system/db-activity-wrapper:latest
|
||||||
|
|
||||||
- name: Build and push Container Image
|
- name: Build and push Container Image
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
@ -67,4 +57,4 @@ jobs:
|
|||||||
centurion-version-control.default.svc.cluster.local:3000/centurion/${{ steps.extract_repo.outputs.repo_name }}/${{ github.ref_name }}:${{ github.sha }}
|
centurion-version-control.default.svc.cluster.local:3000/centurion/${{ steps.extract_repo.outputs.repo_name }}/${{ github.ref_name }}:${{ github.sha }}
|
||||||
centurion-version-control.default.svc.cluster.local:3000/centurion/${{ steps.extract_repo.outputs.repo_name }}/${{ github.ref_name }}:latest
|
centurion-version-control.default.svc.cluster.local:3000/centurion/${{ steps.extract_repo.outputs.repo_name }}/${{ github.ref_name }}:latest
|
||||||
build-args: |
|
build-args: |
|
||||||
CONTAINER_REGISTRY=centurion-version-control.default.svc.cluster.local:3000/centurion/system
|
CONTAINER_REGISTRY=centurion-version-control.default.svc.cluster.local:3000/centurion/system
|
||||||
Loading…
x
Reference in New Issue
Block a user