chore: migrate CI to Gitea Actions
All checks were successful
Build and Publish Images / build-and-push (push) Successful in 9m19s
All checks were successful
Build and Publish Images / build-and-push (push) Successful in 9m19s
This commit is contained in:
42
.github/workflows/docker-publish.yml
vendored
42
.github/workflows/docker-publish.yml
vendored
@@ -8,40 +8,24 @@ on:
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Compute lowercase owner
|
||||
run: echo "OWNER_LC=${GITHUB_REPOSITORY_OWNER,,}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Login to Gitea Registry
|
||||
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login 192.168.31.100:3847 -u ${{ secrets.REGISTRY_USER }} --password-stdin
|
||||
|
||||
- name: Build and push backend image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./backend
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ env.OWNER_LC }}/family_budget-backend:latest
|
||||
ghcr.io/${{ env.OWNER_LC }}/family_budget-backend:${{ github.sha }}
|
||||
run: |
|
||||
docker build -t 192.168.31.100:3847/arrelin/family_budget-backend:latest -t 192.168.31.100:3847/arrelin/family_budget-backend:${{ gitea.sha }} ./backend
|
||||
docker push 192.168.31.100:3847/arrelin/family_budget-backend:latest
|
||||
docker push 192.168.31.100:3847/arrelin/family_budget-backend:${{ gitea.sha }}
|
||||
|
||||
- name: Build and push frontend image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./frontend
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ env.OWNER_LC }}/family_budget-frontend:latest
|
||||
ghcr.io/${{ env.OWNER_LC }}/family_budget-frontend:${{ github.sha }}
|
||||
run: |
|
||||
docker build -t 192.168.31.100:3847/arrelin/family_budget-frontend:latest -t 192.168.31.100:3847/arrelin/family_budget-frontend:${{ gitea.sha }} ./frontend
|
||||
docker push 192.168.31.100:3847/arrelin/family_budget-frontend:latest
|
||||
docker push 192.168.31.100:3847/arrelin/family_budget-frontend:${{ gitea.sha }}
|
||||
|
||||
- name: Logout
|
||||
run: docker logout 192.168.31.100:3847
|
||||
|
||||
Reference in New Issue
Block a user