diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 173eda9f456..f9b550690b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,9 @@ on: paths-ignore: - "docs/**" - "README.md" + - "docker/**" + - "deploy/**" + - ".github/workflows/web-*.yml" push: branches: - master @@ -23,6 +26,8 @@ on: - "res/**" - "appimage/**" - "flatpak/**" + - "docker/**" + - "deploy/**" jobs: # ensure_cargo_fmt: diff --git a/.github/workflows/flutter-ci.yml b/.github/workflows/flutter-ci.yml index a64dd11972a..07c7155ad9d 100644 --- a/.github/workflows/flutter-ci.yml +++ b/.github/workflows/flutter-ci.yml @@ -6,6 +6,9 @@ on: paths-ignore: - "docs/**" - "README.md" + - "docker/**" + - "deploy/**" + - ".github/workflows/web-*.yml" push: branches: - master @@ -16,6 +19,8 @@ on: - "res/**" - "appimage/**" - "flatpak/**" + - "docker/**" + - "deploy/**" jobs: run-ci: diff --git a/.github/workflows/web-deps.yml b/.github/workflows/web-deps.yml index 5d8188018dd..309f1895b87 100644 --- a/.github/workflows/web-deps.yml +++ b/.github/workflows/web-deps.yml @@ -6,17 +6,22 @@ on: - 'docker/web-deps/**' - '.github/workflows/web-deps.yml' push: - tags: ['*'] + branches: [master] + paths: + - 'docker/web-deps/**' + - '.github/workflows/web-deps.yml' + tags: ['web-deps-*'] workflow_dispatch: env: - IMAGE_NAME: rophy/rustdesk-web-deps + IMAGE_NAME: ghcr.io/rophy/rustdesk/web-deps jobs: build: runs-on: ubuntu-22.04 permissions: contents: read + packages: write steps: - name: Checkout uses: actions/checkout@v4 @@ -26,12 +31,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Log in to Docker Hub + - name: Log in to GHCR if: startsWith(github.ref, 'refs/tags/') uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata id: meta @@ -39,9 +45,8 @@ jobs: with: images: ${{ env.IMAGE_NAME }} tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=raw,value=latest + type=match,pattern=web-deps-(.+),group=1 + type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }} - name: Build and push uses: docker/build-push-action@v6 diff --git a/.github/workflows/web-docker.yml b/.github/workflows/web-docker.yml index 4ac5da1d878..159acbad79e 100644 --- a/.github/workflows/web-docker.yml +++ b/.github/workflows/web-docker.yml @@ -7,15 +7,24 @@ on: - 'flutter/lib/**' - 'flutter/assets/**' - 'flutter/pubspec.*' - - 'deploy/docker/webclient/Dockerfile' + - 'docker/web-client/**' - '.github/workflows/web-docker.yml' - '.github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff' push: - tags: ['*'] + branches: [master] + paths: + - 'flutter/web/**' + - 'flutter/lib/**' + - 'flutter/assets/**' + - 'flutter/pubspec.*' + - 'docker/web-client/**' + - '.github/workflows/web-docker.yml' + - '.github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff' + tags: ['web-client-*'] workflow_dispatch: env: - IMAGE_NAME: rophy/rustdesk-webclient + IMAGE_NAME: ghcr.io/rophy/rustdesk/web-client jobs: test: @@ -50,6 +59,7 @@ jobs: runs-on: ubuntu-22.04 permissions: contents: read + packages: write steps: - name: Checkout uses: actions/checkout@v4 @@ -60,12 +70,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Log in to Docker Hub + - name: Log in to GHCR if: startsWith(github.ref, 'refs/tags/') uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata id: meta @@ -73,14 +84,14 @@ jobs: with: images: ${{ env.IMAGE_NAME }} tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} + type=match,pattern=web-client-(.+),group=1 + type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }} - name: Build and push uses: docker/build-push-action@v6 with: context: . - file: deploy/docker/webclient/Dockerfile + file: docker/web-client/Dockerfile push: ${{ startsWith(github.ref, 'refs/tags/') }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}