From 0f989a778f60b870ed1247a19e95726b3a652da1 Mon Sep 17 00:00:00 2001 From: jabuxas Date: Thu, 19 Sep 2024 13:13:41 -0300 Subject: [PATCH] ci: create docker image on tag creation --- .github/workflows/docker-tag.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/docker-tag.yaml diff --git a/.github/workflows/docker-tag.yaml b/.github/workflows/docker-tag.yaml new file mode 100644 index 0000000..075a6b7 --- /dev/null +++ b/.github/workflows/docker-tag.yaml @@ -0,0 +1,28 @@ +name: Build and Push Docker Image Tag + +on: + push: + tags: + - "*" + +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:${{ github.ref_name }} . + docker push git.jabuxas.xyz/jabuxas/abyss:${{ github.ref_name }} + + - name: Log out of Docker registry + run: docker logout git.jabuxas.xyz