feat: publish Swarm images to Gitea registry
This commit is contained in:
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
@@ -7,6 +7,7 @@ on:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
@@ -20,3 +21,21 @@ jobs:
|
||||
- run: npm ci --include=dev
|
||||
- run: npm run typecheck
|
||||
- run: npm run build
|
||||
|
||||
publish-images:
|
||||
name: Build and publish Docker images
|
||||
needs: validate
|
||||
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Sign in to the Gitea Container Registry
|
||||
run: echo "${{ secrets.GITEA_TOKEN }}" | docker login gitea.blyzer.com.br -u "${{ gitea.actor }}" --password-stdin
|
||||
- name: Build and publish API
|
||||
run: |
|
||||
docker build --pull -f Dockerfile.api -t gitea.blyzer.com.br/blyzer/compor-academy-api:latest .
|
||||
docker push gitea.blyzer.com.br/blyzer/compor-academy-api:latest
|
||||
- name: Build and publish web
|
||||
run: |
|
||||
docker build --pull -f Dockerfile.web -t gitea.blyzer.com.br/blyzer/compor-academy-web:latest .
|
||||
docker push gitea.blyzer.com.br/blyzer/compor-academy-web:latest
|
||||
|
||||
Reference in New Issue
Block a user