From e256fd6c57a9fd79d052c3e6611292845a7650c1 Mon Sep 17 00:00:00 2001 From: jabuxas Date: Fri, 6 Sep 2024 11:38:53 -0300 Subject: [PATCH] ops: add docker deploy image --- .github/workflows/docker.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/docker.yaml diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml new file mode 100644 index 0000000..9819de7 --- /dev/null +++ b/.github/workflows/docker.yaml @@ -0,0 +1,31 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to Docker registry + run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login git.jabuxas.xyz -u ${{ secrets.DOCKER_USERNAME }} --password-stdin + + - name: Build and push Docker image + run: | + docker build -t git.jabuxas.xyz/jabuxas/abyss:latest . + docker push git.jabuxas.xyz/jabuxas/abyss:latest + + - name: Log out of Docker registry + run: docker logout git.jabuxas.xyz