Skip to content

Commit

Permalink
Fix docker publishing from release
Browse files Browse the repository at this point in the history
  • Loading branch information
Shraymonks committed Sep 17, 2023
1 parent 4664126 commit e81b5ab
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 35 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/publish.yml

This file was deleted.

26 changes: 25 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ on:
push:
branches:
- main
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
outputs:
published: ${{ steps.changesets.outputs.published }}
version: ${{ steps.changesets.publishedPackages[0].version }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -39,3 +41,25 @@ jobs:
publish: pnpm changeset tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish:
name: Publish to Docker
runs-on: ubuntu-latest
needs: release
if: needs.release.outputs.published == 'false'
steps:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: shraymonks/unmonitorr:latest,shraymonks/unmonitorr:v${{ needs.release.outputs.version }}

0 comments on commit e81b5ab

Please sign in to comment.