Skip to content

Commit

Permalink
Add actions:write for concurrency cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
ssheorey committed Jun 3, 2024
1 parent e7f6c2b commit 004482c
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 61 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/clean-gcloud-profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,11 @@
# happens, run this workflow manually to clean up the login profiles.

name: Clean GCloud Profiles
permissions: read-all
permissions:
contents: read

on:
workflow_dispatch:
# push:
# branches:
# - main
# pull_request:
# types: [opened, reopened, synchronize]

env:
GCE_GPU_CI_SA: ${{ secrets.GCE_GPU_CI_SA }}
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Documentation
permissions: read-all
permissions:
contents: write
actions: write

on:
workflow_dispatch:
Expand Down Expand Up @@ -79,17 +81,13 @@ jobs:
ccache -s
- name: Upload docs
permissions:
contents: write
uses: actions/upload-artifact@v4
with:
name: open3d_docs
path: docs/_out/html
if-no-files-found: error

- name: Deploy docs if all artifacts available
permissions:
contents: write
if: ${{ github.ref == 'refs/heads/main' }}
env:
GH_TOKEN: ${{ github.token }}
Expand Down
20 changes: 3 additions & 17 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: MacOS
permissions: read-all
permissions:
contents: write
actions: write

on:
workflow_dispatch:
Expand Down Expand Up @@ -113,8 +115,6 @@ jobs:
ccache -s
- name: Upload package
permissions:
contents: write
if: ${{ env.BUILD_SHARED_LIBS == 'ON' }}
uses: actions/upload-artifact@v4
with:
Expand All @@ -123,8 +123,6 @@ jobs:
if-no-files-found: error

- name: Update package devel release
permissions:
contents: write
if: ${{ github.ref == 'refs/heads/main' && env.BUILD_SHARED_LIBS == 'ON' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -133,8 +131,6 @@ jobs:
gh release view main-devel
- name: Upload Open3D viewer app
permissions:
contents: write
uses: actions/upload-artifact@v4
if: ${{ env.BUILD_SHARED_LIBS == 'OFF' }}
with:
Expand Down Expand Up @@ -169,17 +165,13 @@ jobs:
zip -rv "${APP_NAME}" Open3D.app
- name: Upload Open3D viewer app
permissions:
contents: write
uses: actions/upload-artifact@v4
with:
name: open3d-app-macosx-10_15-universal2
path: open3d-*-app-macosx-10_15-universal2.zip
if-no-files-found: error

- name: Update viewer devel release
permissions:
contents: write
if: ${{ github.ref == 'refs/heads/main' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -289,8 +281,6 @@ jobs:
echo "PIP_PKG_NAME=$PIP_PKG_NAME" >> $GITHUB_ENV
- name: Upload wheel
permissions:
contents: write
uses: actions/upload-artifact@v4
with:
name: ${{ env.PIP_PKG_NAME }}
Expand Down Expand Up @@ -348,17 +338,13 @@ jobs:
echo "PIP_PKG_NAME=$NEW_WHL_NAME" >> $GITHUB_ENV
- name: Upload merged wheels
permissions:
contents: write
uses: actions/upload-artifact@v4
with:
name: ${{ env.PIP_PKG_NAME }}
path: universal_wheels/${{ env.PIP_PKG_NAME }}
if-no-files-found: error

- name: Update devel release
permissions:
contents: write
if: ${{ github.ref == 'refs/heads/main' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Style Check
permissions: read-all
permissions:
contents: read
actions: write

on:
workflow_dispatch:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/ubuntu-cuda.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Ubuntu CUDA
permissions: read-all
permissions:
contents: write
actions: write

on:
workflow_dispatch:
Expand Down Expand Up @@ -150,8 +152,6 @@ jobs:
fi
- name: Upload package
permissions:
contents: write
if: ${{ env.BUILD_PACKAGE == 'true' }}
uses: actions/upload-artifact@v4
with:
Expand All @@ -160,8 +160,6 @@ jobs:
if-no-files-found: error

- name: Update devel release
permissions:
contents: write
if: ${{ github.ref == 'refs/heads/main' && env.BUILD_PACKAGE == 'true' }}
env:
GH_TOKEN: ${{ github.token }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ubuntu-openblas.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Ubuntu OpenBLAS
permissions: read-all
permissions:
contents: read
actions: write

on:
workflow_dispatch:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ubuntu-sycl.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Ubuntu SYCL
permissions: read-all
permissions:
contents: read
actions: write

on:
workflow_dispatch:
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/ubuntu-wheel.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Ubuntu Wheel
permissions: read-all
permissions:
contents: write
actions: write

on:
workflow_dispatch:
Expand Down Expand Up @@ -79,8 +81,6 @@ jobs:
echo "PIP_PKG_NAME=$PIP_PKG_NAME" >> $GITHUB_ENV
echo "PIP_CPU_PKG_NAME=$PIP_CPU_PKG_NAME" >> $GITHUB_ENV
- name: Upload wheel to GitHub artifacts
permissions:
contents: write
uses: actions/upload-artifact@v4
with:
name: ${{ env.PIP_PKG_NAME }}
Expand All @@ -105,9 +105,7 @@ jobs:
run: |
gsutil cp ${GITHUB_WORKSPACE}/${{ env.CCACHE_TAR_NAME }}.tar.gz gs://open3d-ci-cache/
- name: Update devel release
permissions:
contents: write
# if: ${{ github.ref == 'refs/heads/main' }}
if: ${{ github.ref == 'refs/heads/main' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Ubuntu
permissions: read-all
permissions:
contents: write
actions: write

on:
workflow_dispatch:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/webrtc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: WebRTC
permissions: read-all
permissions:
contents: write
actions: write

on:
workflow_dispatch:
Expand Down Expand Up @@ -62,8 +64,6 @@ jobs:
build_webrtc
- name: Upload WebRTC
permissions:
contents: write
uses: actions/upload-artifact@v4
with:
name: webrtc_release_${{ matrix.os }}
Expand Down Expand Up @@ -170,8 +170,6 @@ jobs:
cmake -E sha256sum webrtc_${env:WEBRTC_COMMIT_SHORT}_win.zip | Tee-Object -FilePath checksum_win.txt
- name: Upload WebRTC
permissions:
contents: write
uses: actions/upload-artifact@v4
with:
name: webrtc_release_windows
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Windows
permissions: read-all
permissions:
contents: write
actions: write

on:
workflow_dispatch:
Expand Down Expand Up @@ -147,8 +149,6 @@ jobs:
$env:GITHUB_ENV -Encoding utf8 -Append
- name: Upload Package
permissions:
contents: write
if: ${{ matrix.BUILD_SHARED_LIBS == 'ON' && matrix.BUILD_CUDA_MODULE == 'OFF' }}
uses: actions/upload-artifact@v4
with:
Expand All @@ -157,8 +157,6 @@ jobs:
if-no-files-found: error

- name: Update devel release with package
permissions:
contents: write
if: ${{ github.ref == 'refs/heads/main' && matrix.BUILD_SHARED_LIBS == 'ON' && matrix.BUILD_CUDA_MODULE == 'OFF' }}
env:
GH_TOKEN: ${{ github.token }}
Expand All @@ -177,8 +175,6 @@ jobs:
--target INSTALL
- name: Upload Viewer
permissions:
contents: write
if: ${{ matrix.BUILD_SHARED_LIBS == 'OFF' && matrix.STATIC_RUNTIME == 'ON' && matrix.BUILD_CUDA_MODULE == 'OFF' && matrix.CONFIG == 'Release' }}
uses: actions/upload-artifact@v4
with:
Expand All @@ -187,8 +183,6 @@ jobs:
if-no-files-found: error

- name: Update devel release with viewer
permissions:
contents: write
if: ${{ github.ref == 'refs/heads/main' && matrix.BUILD_SHARED_LIBS == 'OFF' && matrix.STATIC_RUNTIME == 'ON' && matrix.BUILD_CUDA_MODULE == 'OFF' && matrix.CONFIG == 'Release' }}
env:
GH_TOKEN: ${{ github.token }}
Expand Down Expand Up @@ -310,17 +304,13 @@ jobs:
echo "PIP_PKG_NAME=$PIP_PKG_NAME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Upload wheel
permissions:
contents: write
uses: actions/upload-artifact@v4
with:
name: ${{ env.PIP_PKG_NAME }}
path: ${{ env.BUILD_DIR }}/lib/python_package/pip_package/${{ env.PIP_PKG_NAME }}
if-no-files-found: error

- name: Update devel release with wheel
permissions:
contents: write
if: ${{ github.ref == 'refs/heads/main' }}
env:
GH_TOKEN: ${{ github.token }}
Expand Down

0 comments on commit 004482c

Please sign in to comment.