From be86ca7983714b51ea8165ecbf70f3b740d10262 Mon Sep 17 00:00:00 2001 From: RaghadAlkhous Date: Wed, 6 May 2026 15:30:20 +0300 Subject: [PATCH] update github 22 --- .github/workflows/main.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 86c5076..b90030d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,28 @@ - deploy: +on: + push: + pull_request: + +jobs: + build_and_push_image: + steps: + - name: checkout code + uses: actions/checkout@v5.0.0 + + - name: login to dockerhub + uses: docker/login-action@v3.6.0 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ahmedgamalyousef/firstcicd:latest + + deploy: + needs: build_and_push_image steps: - name: checkout code uses: actions/checkout@v5.0.0 @@ -9,4 +33,4 @@ run: $HOME/ghaymah/bin/gy auth login --email "${{secrets.GHAYMAH_EMAIL}}" --password "${{secrets.GHAYMAH_PW}}" - name: deploy - run: $HOME/ghaymah/bin/gy resource app launch \ No newline at end of file + run: $HOME/ghaymah/bin/gy resource app launch