From e42f307bd19aded187c671af5b43d076edf67255 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 ++++++++++ .github/workflows/release.yml | 89 ------------------------------- 2 files changed, 28 insertions(+), 89 deletions(-) create mode 100644 .github/workflows/docker-tag.yaml delete mode 100644 .github/workflows/release.yml 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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 8d53cad..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,89 +0,0 @@ -# .github/workflows/release.yaml - -on: release -name: Build Release -jobs: - release-linux-386: - name: release linux/386 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: compile and release - uses: ngs/go-release.action@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOARCH: "386" - GOOS: linux - EXTRA_FILES: "README.md LICENSE" - release-linux-amd64: - name: release linux/amd64 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: compile and release - uses: ngs/go-release.action@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOARCH: amd64 - GOOS: linux - EXTRA_FILES: "README.md LICENSE" - release-linux-arm: - name: release linux/386 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: compile and release - uses: ngs/go-release.action@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOARCH: "arm" - GOOS: linux - EXTRA_FILES: "README.md LICENSE" - release-linux-arm64: - name: release linux/amd64 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: compile and release - uses: ngs/go-release.action@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOARCH: arm64 - GOOS: linux - EXTRA_FILES: "README.md LICENSE" - release-darwin-amd64: - name: release darwin/amd64 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: compile and release - uses: ngs/go-release.action@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOARCH: amd64 - GOOS: darwin - EXTRA_FILES: "README.md LICENSE" - release-windows-386: - name: release windows/386 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: compile and release - uses: ngs/go-release.action@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOARCH: "386" - GOOS: windows - EXTRA_FILES: "README.md LICENSE" - release-windows-amd64: - name: release windows/amd64 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: compile and release - uses: ngs/go-release.action@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GOARCH: amd64 - GOOS: windows - EXTRA_FILES: "README.md LICENSE"