feat: migrate from GitLab CI to Gitea Actions
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
name: schemas-app
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
BUILDTOOLS_CONTENT: ${{ secrets.BUILDTOOLS_CONTENT }}
|
||||||
|
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: buildtool/setup-buildtools-action@v1
|
||||||
|
- name: Build and push
|
||||||
|
run: unset GITEA_TOKEN && build && push
|
||||||
|
|
||||||
|
deploy-prod:
|
||||||
|
needs: build
|
||||||
|
if: gitea.ref == 'refs/heads/main'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
BUILDTOOLS_CONTENT: ${{ secrets.BUILDTOOLS_CONTENT }}
|
||||||
|
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||||
|
environment: prod
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: buildtool/setup-buildtools-action@v1
|
||||||
|
- name: Deploy to production
|
||||||
|
run: deploy prod
|
||||||
+1
-1
@@ -37,7 +37,7 @@ spec:
|
|||||||
topologyKey: kubernetes.io/hostname
|
topologyKey: kubernetes.io/hostname
|
||||||
containers:
|
containers:
|
||||||
- name: schemas-app
|
- name: schemas-app
|
||||||
image: registry.gitlab.com/unboundsoftware/schemas-app:${COMMIT}
|
image: oci.unbound.se/unboundsoftware/schemas-app:${COMMIT}
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
|
|||||||
Reference in New Issue
Block a user