Skip to content

Commit

Permalink
Fixes added to the docker-build-push job
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlouet committed Oct 26, 2024
1 parent 6a2cbe5 commit a79e240
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,30 @@ on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
docker:
runs-on: ubuntu-latest
steps:
- uses: docker/login-action@v1
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Harbor
uses: docker/login-action@v3
with:
registry: ${{ secrets.DOCKER_REGISTRY_URL }}
username: ${{ secrets.DOCKER_REGISTRY_USER }}
registry: ${{ secrets.DOCKER_REGISTRY_URL }}
username: ${{ secrets.DOCKER_REGISTRY_USER }}
password: ${{ secrets.DOCKER_REGISTRY_PASS }}

- uses: actions/checkout@v3
- name: BuildAndPushImageOnHarbor
run: |
docker build ./ -t ${{ secrets.DOCKER_REGISTRY_URL }}/breizhcamp/kalon:${{ github.run_number }}
docker push ${{ secrets.DOCKER_REGISTRY_URL }}/breizhcamp/kalon:${{ github.run_number }}
-
name: Build and push
uses: docker/build-push-action@v6
env:
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY_URL }}
DOCKER_REPOSITORY: breizhcamp/kalon
with:
push: true
tags: $HARBOR_REGISTRY/$DOCKER_REPOSITORY:latest

0 comments on commit a79e240

Please sign in to comment.