diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml new file mode 100644 index 00000000000..69666846463 --- /dev/null +++ b/.github/workflows/commit.yml @@ -0,0 +1,54 @@ +#To test commit +name: NodeJS with Webpack + +on: + #push: + #branches: [ "maya-trenser-action-1" ] + #pull_request: + #branches: [ "master" ] + +permissions: + contents: write + +jobs: + buildCornerstone3D: + runs-on: ubuntu-latest + + steps: + - name: Checkout gh page + uses: actions/checkout@v3 + with: + #github-server-url: https://maya-trenser:${{ secrets.MY_TOKEN }}@github.com + repository: maya-trenser/maya-trenser.github.io + path: ./maya-trenser.github.io + token: ${{ secrets.MY_TOKEN }} + + - name: Copy + run: | + #echo ${{ secrets.MY_TOKEN }} + pwd + ls -a ./maya-trenser.github.io + mv ./maya-trenser.github.io/.git /tmp/ + rm -r ./maya-trenser.github.io/* + mv /tmp/.git ./maya-trenser.github.io + ls -a ./maya-trenser.github.io + cd ./maya-trenser.github.io + git config --global user.name "maya-trenser" + git config --global user.email "maya.mohan@trenser.com" + git config --list + #git remote set-url origin https://maya-trenser:${{ secrets.GITHUB_TOKEN }}@github.com/maya-trenser.github.io + #git config --list + git remote set-url origin https://maya-trenser:${{ secrets.MY_TOKEN }}@github.com/maya-trenser/maya-trenser.github.io + git config --list + #git checkout "${GITHUB_REF:11}" + git commit -a -m "publishing viewer" + git push -u origin + + test: + runs-on: ubuntu-latest + needs: + buildCornerstone3D + steps: + - name: echooo + run: | + echo "If you can read this, succeeded" diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 00000000000..5d44fff9878 --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,82 @@ +#To test commit +name: NodeJS with Webpack + +on: + #push: + #branches: [ "maya-trenser-action-1" ] + #pull_request: + #branches: [ "master" ] + +permissions: + contents: write + +jobs: + buildCornerstone3D: + runs-on: ubuntu-latest + + steps: + - name: Checkout gh page + uses: actions/checkout@v3 + with: + github-server-url: https://maya-trenser:${{ Secrets.MY_TOKEN }}@github.com + repository: maya-trenser/maya-trenser.github.io + path: ./maya-trenser.github.io + + - name: Copy + run: | + echo ${{ Secrets.MY_TOKEN }} + pwd + ls -a ./maya-trenser.github.io + mv ./maya-trenser.github.io/.git /tmp/ + rm -r ./maya-trenser.github.io/* + mv /tmp/.git ./maya-trenser.github.io + ls -a ./maya-trenser.github.io + #cd ./maya-trenser.github.io + #git config --global user.name "maya-trenser" + #git config --global user.email "maya.mohan@trenser.com" + #git commit -a -m "publishing viewer" + #git config --list + #git remote set-url origin https://maya-trenser:${{ Secrets.MY_TOKEN }}@github.com/maya-trenser.github.io + #git config --list + #git push origin + + - name: Checkout viewer + uses: actions/checkout@v3 + with: + repository: maya-trenser/Viewers + path: ./Viewers + + - name: sample + run: pwd + + - name: Pushes test file + uses: dmnemec/copy_file_to_another_repo_action@main + env: + API_TOKEN_GITHUB: ${{ secrets.MY_TOKEN }} + with: + source_file: Viewers/platform/app + destination_repo: 'maya-trenser/maya-trenser.github.io' + #destination_folder: 'test-dir' + user_email: 'maya.mohan@trenser.com' + user_name: 'maya-trenser' + commit_message: 'A custom message for the commit' + + #- name: Deploy to external repository + # uses: cpina/github-action-push-to-another-repository@main + # env: + # API_TOKEN_GITHUB: ${{ GITHUB_TOKEN }} +# + # with: + # source-directory: Viewers/platform/app + # destination-github-username: maya-trenser + # destination-repository-name: maya-trenser.github.io + # user-email: maya.mohan@trenser.com + + test: + runs-on: ubuntu-latest + needs: + buildCornerstone3D + steps: + - name: echooo + run: | + echo "If you can read this, succeeded" diff --git a/.github/workflows/sample.yml b/.github/workflows/sample.yml new file mode 100644 index 00000000000..e4990edb561 --- /dev/null +++ b/.github/workflows/sample.yml @@ -0,0 +1,47 @@ +name: NodeJS with Webpack + +on: + #push: + #branches: [ "maya-trenser-action-1" ] + #pull_request: + #branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Build + run: | + yarn install + npm run build + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: my-artifact + path: platform/app/dist + + deploy: + environment: + name: development + url: https://github.com/${{ github.repository }}/releases/tag/1 + runs-on: ubuntu-latest + needs: + build + steps: + - name: Download + uses: actions/download-artifact@v3 + with: + name: my-artifact + path: platform/app diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000000..b80a85cbf39 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,101 @@ +name: NodeJS with Webpack + +on: + push: + branches: [ "maya-trenser-action-1" ] + #pull_request: + #branches: [ "master" ] + +jobs: + buildCornerstone3D: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x] + + steps: + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Checkout + uses: actions/checkout@v3 + with: + repository: maya-trenser/cornerstone3D + ref: maya-trenser-patch-1 + path: ./cornerstone3D + + - name: Build + run: | + cd ./cornerstone3D + pwd + yarn install + yarn build:all + - uses: actions/checkout@v3 + with: + repository: maya-trenser/Viewers + path: ./Viewers + + - name: Link + run: | + #cd ./cornerstone3D/packages/dicomImageLoader/dist + #pwd + #yarn link + cd ./cornerstone3D/packages/adapters/dist + yarn link + cd ../../core/dist + yarn link + cd ../../dicomImageLoader/dist + yarn link + #cd ../../nifti-volume-loader/dist + #yarn link + cd ../../streaming-image-volume-loader/dist + yarn link + cd ../../tools/dist + yarn link + cd ../../../../Viewers + yarn link @cornerstonejs/adapters + yarn link @cornerstonejs/core + yarn link @cornerstonejs/dicom-image-loader + #yarn link @cornerstonejs/nifti-volume-loader + yarn link @cornerstonejs/streaming-image-volume-loader + yarn link @cornerstonejs/tools + yarn install + yarn run build + + - name: Checkout gh page + uses: actions/checkout@v3 + with: + repository: maya-trenser/maya-trenser.github.io + path: ./maya-trenser.github.io + token: ${{ secrets.MY_TOKEN }} + + - name: Copy + run: | + pwd + ls -a ./maya-trenser.github.io + mv ./maya-trenser.github.io/.git /tmp/ + rm -r ./maya-trenser.github.io + #ls -a ./maya-trenser.github.io + #ls -a ./Viewers/platform/app/dist/ + cp -r ./Viewers/platform/app/dist/ ./maya-trenser.github.io + mv /tmp/.git ./maya-trenser.github.io + ls -a ./maya-trenser.github.io + cd ./maya-trenser.github.io + git config --global user.name "maya-trenser" + git config --global user.email "maya.mohan@trenser.com" + git remote set-url origin https://maya-trenser:${{ secrets.MY_TOKEN }}@github.com/maya-trenser/maya-trenser.github.io + git add . + git commit -a -m "publishing viewer" + git push -u origin + + test: + runs-on: ubuntu-latest + needs: + buildCornerstone3D + steps: + - name: echooo + run: | + echo "If you can read this, succeeded"