diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml new file mode 100644 index 00000000..049c1eae --- /dev/null +++ b/.github/workflows/develop.yml @@ -0,0 +1,38 @@ +name: Docker Develop Release + +on: + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + +jobs: + + docker-develop: + runs-on: ubuntu-latest + + steps: + + - name: Check Out Repo + uses: actions/checkout@v2 + with: + ref: develop + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + context: ./ + file: ./Dockerfile + push: true + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:develop diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml new file mode 100644 index 00000000..c458a431 --- /dev/null +++ b/.github/workflows/latest.yml @@ -0,0 +1,36 @@ +name: Docker Latest Release + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + docker-latest: + runs-on: ubuntu-latest + + steps: + + - name: Check Out Repo + uses: actions/checkout@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + context: ./ + file: ./Dockerfile + push: true + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:latest diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 00000000..8a6aa3ab --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,18 @@ +name: Tag + +on: + push: + branches: [ master ] + +jobs: + tag-new-versions: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + token: ${{ secrets.PAT }} + fetch-depth: 2 + - uses: salsify/action-detect-and-tag-new-version@v1.0.3 + with: + version-command: | + cat VERSION diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml new file mode 100644 index 00000000..fdfa7384 --- /dev/null +++ b/.github/workflows/version.yml @@ -0,0 +1,39 @@ +name: Docker Version Release + +on: + create: + tags: + - v* + +jobs: + + docker-develop: + runs-on: ubuntu-latest + + steps: + + - name: Check Out Repo + uses: actions/checkout@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + context: ./ + file: ./Dockerfile + push: true + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:${{ steps.get_version.outputs.VERSION }}