diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fc3071c..577b709 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,11 +6,6 @@ on: - main workflow_dispatch: -env: - PADISAH: Osman - IMAGE_NAME: phptodo-example - IMAGE_TAG: latest - jobs: docker-img-build-job: env: @@ -18,24 +13,36 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: pwd && ls -al - env: - PADISAH3: Murad - docker-push: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: | - echo $PADISAH - echo $PADISAH2 - echo $PADISAH3 - # - run: docker image build -t ugurkontel/phptodo-example:frontend -f ./Dockerfile.frontend - # - run: docker image build -t ugurkontel/phptodo-example:backend -f ./Dockerfile.backend - # - run: docker image build -t ugurkontel/phptodo-example:database -f ./Dockerfile.database + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push Frontend + uses: docker/build-push-action@v5 + with: + push: true + tags: ugurkontel/phptodo:frontend + file: ./Dockerfile.frontend - # - run: docker login -u ugurkontel -p P@ssw0rd! + - name: Build and push Backend + uses: docker/build-push-action@v5 + with: + push: true + tags: ugurkontel/phptodo:backend + file: ./Dockerfile.backend - # - run: docker push ugurkontel/phptodo-example:frontend - # - run: docker push ugurkontel/phptodo-example:backend - # - run: docker push ugurkontel/phptodo-example:database \ No newline at end of file + - name: Build and push Database + uses: docker/build-push-action@v5 + with: + push: true + tags: ugurkontel/phptodo:database + file: ./Dockerfile.database \ No newline at end of file