From faccb53521ba94588bfa9882f72e8dcb504d6717 Mon Sep 17 00:00:00 2001 From: ali nabil Date: Thu, 13 Feb 2025 13:47:38 +0400 Subject: [PATCH] Add work flows file --- .github/workflows/docker-image.ymal | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/docker-image.ymal diff --git a/.github/workflows/docker-image.ymal b/.github/workflows/docker-image.ymal new file mode 100644 index 0000000..331837e --- /dev/null +++ b/.github/workflows/docker-image.ymal @@ -0,0 +1,35 @@ +# .github/workflows/docker-image.yml +name: Docker Image CI +on: + push: + branches: + - main + pull_request: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: | + ghcr.io/${{ github.repository_owner }}/abohmeed/getting-started:latest + ghcr.io/${{ github.repository_owner }}/abohmeed/getting-started:${{ github.sha }} \ No newline at end of file