diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index adb1f52..0000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Release Container - -on: - push: - branches: [ main ] - workflow_dispatch: - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: tanq16 - password: ${{ secrets.DOCKER_ACCESS_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - push: true - tags: tanq16/budgetlord:main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e431da8..439d764 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,7 @@ name: Release Build on: push: branches: [ main ] + workflow_dispatch: permissions: contents: write @@ -18,7 +19,6 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Determine Version id: version run: | @@ -42,7 +42,6 @@ jobs: echo "new_version=$NEW_VERSION" >> "$GITHUB_OUTPUT" env: GH_TOKEN: ${{ github.token }} - - name: Create Release id: create_release run: | @@ -63,16 +62,13 @@ jobs: arch: [amd64, arm64] steps: - uses: actions/checkout@v4 - - name: Set up Go uses: actions/setup-go@v5 with: go-version: '1.23' - - name: Build Binary run: | GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o budgetlord-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.os == 'windows' && '.exe' || '' }} ./cmd/budgetlord - - name: Upload Release Asset run: | gh release upload "${{ needs.create-release.outputs.version }}" \ @@ -85,9 +81,26 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Publish Release run: | gh release edit "${{ needs.create-release.outputs.version }}" --draft=false env: GH_TOKEN: ${{ github.token }} + + docker: + needs: [create-release, build, publish] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: tanq16 + password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: tanq16/budgetlord:main