From e5ff345e34f86bb20a1bab9ecf502720660e29ee Mon Sep 17 00:00:00 2001 From: Nobody <17956512+n0bodysec@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:39:18 -0300 Subject: [PATCH] ci: update workflows [skip-ci] --- .github/workflows/copy.yml | 49 --------------------------- .github/workflows/publish-stremio.yml | 47 +++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 49 deletions(-) delete mode 100644 .github/workflows/copy.yml create mode 100644 .github/workflows/publish-stremio.yml diff --git a/.github/workflows/copy.yml b/.github/workflows/copy.yml deleted file mode 100644 index aa5d53a..0000000 --- a/.github/workflows/copy.yml +++ /dev/null @@ -1,49 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -# GitHub recommends pinning actions to a commit SHA. -# To get a newer version, you will need to update the SHA. -# You can also reference a tag or branch, but the action may change without warning. - -name: Copy folders to repositories - -on: - push: - branches: - - main - -jobs: - copy: - name: Push to repositories - runs-on: ubuntu-latest - if: "! contains(github.event.head_commit.message, 'skip-ci')" - steps: - - name: Copy alpine-s6 - if: "contains(github.event.head_commit.message, 'alpine-s6')" - uses: andstor/copycat-action@c2b0316e9ab883478a4a7d40a4fcb03d17f281aa - with: - personal_token: ${{ secrets.PERSONAL_TOKEN }} - src_path: baseimage/alpine-s6 - dst_path: /. - dst_owner: docker-scripts - dst_repo_name: baseimage-alpine - dst_branch: main - src_branch: main - username: github-actions[bot] - email: 41898282+github-actions[bot]@users.noreply.github.com - - - name: Copy stremio - if: "contains(github.event.head_commit.message, 'stremio')" - uses: andstor/copycat-action@c2b0316e9ab883478a4a7d40a4fcb03d17f281aa - with: - personal_token: ${{ secrets.PERSONAL_TOKEN }} - src_path: /stremio - dst_path: /. - dst_owner: docker-scripts - dst_repo_name: stremio - dst_branch: main - src_branch: main - username: github-actions[bot] - email: 41898282+github-actions[bot]@users.noreply.github.com diff --git a/.github/workflows/publish-stremio.yml b/.github/workflows/publish-stremio.yml new file mode 100644 index 0000000..f62cf65 --- /dev/null +++ b/.github/workflows/publish-stremio.yml @@ -0,0 +1,47 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# GitHub recommends pinning actions to a commit SHA. +# To get a newer version, you will need to update the SHA. +# You can also reference a tag or branch, but the action may change without warning. + +name: Publish Stremio Docker Image + +on: + workflow_dispatch: + push: + branches: main + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + if: "contains(github.event.head_commit.message, '(stremio)') && ! contains(github.event.head_commit.message, 'skip-ci')" + + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: stremio/ + platforms: linux/amd64,linux/arm64 + push: true + tags: n0bodysec/stremio:latest + cache-from: type=gha + cache-to: type=gha,mode=max