From 2ec3731f1cb031b7ea9d1a8c17008095054a8938 Mon Sep 17 00:00:00 2001 From: ahmedgamalyousef Date: Thu, 9 Oct 2025 22:15:34 +0300 Subject: [PATCH] Uppdating CICD Workflow --- .github/workflows/cicd.yml | 41 ++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index a3f3939..2446753 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -1,17 +1,36 @@ -name: my first workflow on GitPasha - on: push: - branches: [ main ] - + pull_request: + jobs: - my-first-job: + build_and_push_image: steps: - - name: say hello - run: echo "Hello World" + - name: checkout code + uses: actions/checkout@v5.0.0 - - name: create file - run: touch jemy.log + - name: login to dockerhub + uses: docker/login-action@v3.6.0 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: list files - run: ls -la \ No newline at end of file + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: firstcicd:latest + + deploy: + needs: build_and_push_image + steps: + - name: checkout code + uses: actions/checkout@v5.0.0 + - name: install ghaymah cli + run: curl -sSl https://cli.ghaymah.systems/install.sh | bash + + - name: login to ghaymah + 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