fix: missing updates for docker hub
Pull Request CI-Backend / Checks (pull_request) Successful in 58s
Pull Request CI-Frontend / Checks (pull_request) Successful in 2m51s
Pull Request CI-Frontend / Build & Push (pull_request) Successful in 2m2s
Pull Request CI-Backend / Build & Push (pull_request) Failing after 4m7s
Pull Request CI-Backend / Checks (pull_request) Successful in 58s
Pull Request CI-Frontend / Checks (pull_request) Successful in 2m51s
Pull Request CI-Frontend / Build & Push (pull_request) Successful in 2m2s
Pull Request CI-Backend / Build & Push (pull_request) Failing after 4m7s
This commit is contained in:
@@ -33,10 +33,6 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- name: Set lowercase repo name
|
||||
id: repo
|
||||
run: echo "name=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Increment version in pom.xml
|
||||
id: version
|
||||
working-directory: ./server
|
||||
@@ -56,12 +52,11 @@ jobs:
|
||||
git commit -m "chore: bump api version to ${{ steps.version.outputs.version }} [skip ci]"
|
||||
git push
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: lightroasted.vps-kinghost.net
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Find PR number
|
||||
id: find_pr
|
||||
@@ -81,9 +76,9 @@ jobs:
|
||||
- name: Promote Docker image
|
||||
run: |
|
||||
docker buildx imagetools create \
|
||||
--tag lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/api:latest \
|
||||
--tag lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/api:${{ steps.version.outputs.version }} \
|
||||
lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/api:${{ steps.find_pr.outputs.tag }}
|
||||
--tag rmcampos/tasknote-api:latest \
|
||||
--tag rmcampos/tasknote-api:${{ steps.version.outputs.version }} \
|
||||
rmcampos/tasknote-api:${{ steps.find_pr.outputs.tag }}
|
||||
|
||||
- name: Create and push Git tag
|
||||
run: |
|
||||
|
||||
@@ -31,10 +31,6 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set lowercase repo name
|
||||
id: repo
|
||||
run: echo "name=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate version tag
|
||||
id: version
|
||||
run: |
|
||||
@@ -46,12 +42,11 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
run: docker buildx inspect --bootstrap
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: lightroasted.vps-kinghost.net
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Find PR number
|
||||
id: find_pr
|
||||
@@ -71,9 +66,9 @@ jobs:
|
||||
- name: Promote Docker image
|
||||
run: |
|
||||
docker buildx imagetools create \
|
||||
--tag lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/app:latest \
|
||||
--tag lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/app:${{ steps.version.outputs.tag }} \
|
||||
lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/app:${{ steps.find_pr.outputs.tag }}
|
||||
--tag rmcampos/tasknote-app:latest \
|
||||
--tag rmcampos/tasknote-app:${{ steps.version.outputs.tag }} \
|
||||
rmcampos/tasknote-app:${{ steps.find_pr.outputs.tag }}
|
||||
|
||||
- name: Create and push Git tag
|
||||
run: |
|
||||
|
||||
@@ -69,30 +69,25 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- name: Set lowercase repo name
|
||||
id: repo
|
||||
run: echo "name=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: lightroasted.vps-kinghost.net
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build Docker image with Spring Boot
|
||||
working-directory: ./server
|
||||
run: |
|
||||
./mvnw -Pnative -DskipTests spring-boot:build-image \
|
||||
-Dspring-boot.build-image.imageName=lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/api:latest \
|
||||
-Dspring-boot.build-image.imageName=rmcampos/tasknote-api:latest \
|
||||
-Dspring-boot.build-image.builder=paketobuildpacks/builder-jammy-tiny:latest
|
||||
|
||||
- name: Tag and push Docker image
|
||||
run: |
|
||||
docker tag lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/api:latest lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/api:candidate
|
||||
docker tag lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/api:latest lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/api:pr-${{ github.event.pull_request.number }}
|
||||
docker push lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/api:candidate
|
||||
docker push lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/api:pr-${{ github.event.pull_request.number }}
|
||||
docker tag rmcampos/tasknote-api:latest rmcampos/tasknote-api:candidate
|
||||
docker tag rmcampos/tasknote-api:latest rmcampos/tasknote-api:pr-${{ github.event.pull_request.number }}
|
||||
docker push rmcampos/tasknote-api:candidate
|
||||
docker push rmcampos/tasknote-api:pr-${{ github.event.pull_request.number }}
|
||||
|
||||
- name: Create Gitea deployment for staging
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
@@ -81,18 +81,17 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
run: docker buildx inspect --bootstrap
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: lightroasted.vps-kinghost.net
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: lightroasted.vps-kinghost.net/${{ github.repository }}/app
|
||||
images: rmcampos/tasknote-app
|
||||
tags: |
|
||||
type=raw,value=candidate
|
||||
type=raw,value=pr-${{ github.event.pull_request.number }}
|
||||
@@ -112,8 +111,8 @@ jobs:
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=registry,ref=lightroasted.vps-kinghost.net/${{ github.repository }}/app:buildcache
|
||||
cache-to: type=registry,ref=lightroasted.vps-kinghost.net/${{ github.repository }}/app:buildcache,mode=max
|
||||
cache-from: type=registry,ref=rmcampos/tasknote-app:buildcache
|
||||
cache-to: type=registry,ref=rmcampos/tasknote-app:buildcache,mode=max
|
||||
build-args: |
|
||||
VITE_BUILD=${{ steps.version.outputs.tag }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user