diff --git a/.github/workflows/onlabel_Fedora_setup.yml b/.github/workflows/onlabel_Fedora_setup.yml index 4eeb1951..56047282 100644 --- a/.github/workflows/onlabel_Fedora_setup.yml +++ b/.github/workflows/onlabel_Fedora_setup.yml @@ -3,13 +3,11 @@ name: Fedora Install on: - pull_request: - types: [ labeled ] + push: + branches: + - "main" env: - LABEL_CHECK: 'fedoraInstall::check' - LABEL_SUCCESS: 'fedoraInstall::passed' - LABEL_FAILURE: 'fedoraInstall::failed' JAGS: '4.3.2' BUILD_LOC: "./build" BRANCH: ${{ github.head_ref || github.ref_name }} @@ -25,7 +23,6 @@ jobs: runs-on: ubuntu-latest container: image: "fedora:latest" - if: ${{ github.event.label.name == 'fedoraInstall::check' }} name: fedora-latest R release env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} @@ -125,40 +122,3 @@ jobs: devtools::build(pkg = '.', path = '${{ env.BUILD_LOC }}/abn.tar.gz', vignettes = FALSE) install.packages('${{ env.BUILD_LOC }}/abn.tar.gz', repos=NULL, type="source") shell: Rscript {0} - - report_Fedora_setup: - if: ${{ (success() || failure()) }} - needs: - - setup-and-install - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - repository-projects: write - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OWNER: ${{ github.repository_owner }} - REPO: ${{ github.event.repository.name }} - steps: - - uses: actions/checkout@v4 - - name: Check if on demand tasks succeeded - run: | - gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} - if [ ${{ needs.setup-and-install.result }} == "success" ]; then - gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} - gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} - echo "### ${{ github.event.label.url }} passed! :rocket:" >> $GITHUB_STEP_SUMMARY - exit 0 - elif [ ${{ needs.setup-and-install.result }} == "failure" ]; then - gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} - gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} - echo "### ${{ github.event.label.url }} failed!" >> $GITHUB_STEP_SUMMARY - exit 1 - else - gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} - echo "On demand task outcome was ${{ needs.setup-and-installoutcome }}" - fi - shell: bash - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - EVENT: ${{ github.event.number }} # This is either the issue or pr diff --git a/.github/workflows/onlabel_Macos_setup.yml b/.github/workflows/onlabel_Macos_setup.yml index 50959dbd..1b7027d9 100644 --- a/.github/workflows/onlabel_Macos_setup.yml +++ b/.github/workflows/onlabel_Macos_setup.yml @@ -3,13 +3,11 @@ name: Macos Install on: - pull_request: - types: [ labeled ] + push: + branches: + - "main" env: - LABEL_CHECK: 'macosInstall::check' - LABEL_SUCCESS: 'macosInstall::passed' - LABEL_FAILURE: 'macosInstall::failed' BUILD_LOC: "./build" BRANCH: ${{ github.head_ref || github.ref_name }} @@ -21,7 +19,6 @@ permissions: jobs: setup-and-install: - if: ${{ github.event.label.name == 'macosInstall::check' }} name: macos-latest R release runs-on: macos-latest env: @@ -95,40 +92,3 @@ jobs: devtools::build(pkg = '.', path = '${{ env.BUILD_LOC }}/abn.tar.gz', vignettes = FALSE) install.packages('${{ env.BUILD_LOC }}/abn.tar.gz', repos=NULL, type="source") shell: Rscript {0} - - report_Macos_setup: - if: ${{ (success() || failure()) }} - needs: - - setup-and-install - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - repository-projects: write - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OWNER: ${{ github.repository_owner }} - REPO: ${{ github.event.repository.name }} - steps: - - uses: actions/checkout@v4 - - name: Check if on demand tasks succeeded - run: | - gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} - if [ ${{ needs.setup-and-install.result }} == "success" ]; then - gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} - gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} - echo "### ${{ github.event.label.url }} passed! :rocket:" >> $GITHUB_STEP_SUMMARY - exit 0 - elif [ ${{ needs.setup-and-install.result }} == "failure" ]; then - gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} - gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} - echo "### ${{ github.event.label.url }} failed!" >> $GITHUB_STEP_SUMMARY - exit 1 - else - gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} - echo "On demand task outcome was ${{ needs.setup-and-install.outcome }}" - fi - shell: bash - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - EVENT: ${{ github.event.number }} # This is either the issue or pr diff --git a/.github/workflows/onlabel_Ubuntu_setup.yml b/.github/workflows/onlabel_Ubuntu_setup.yml index 49a47751..c0f3fe5b 100644 --- a/.github/workflows/onlabel_Ubuntu_setup.yml +++ b/.github/workflows/onlabel_Ubuntu_setup.yml @@ -3,13 +3,11 @@ name: Ubuntu Install on: - pull_request: - types: [ labeled ] + push: + branches: + - "main" env: - LABEL_CHECK: 'ubuntuInstall::check' - LABEL_SUCCESS: 'ubuntuInstall::passed' - LABEL_FAILURE: 'ubuntuInstall::failed' JAGS: '4.3.2' BUILD_LOC: "./build" BRANCH: ${{ github.head_ref || github.ref_name }} @@ -23,7 +21,6 @@ permissions: jobs: setup-and-install: runs-on: ubuntu-latest - if: ${{ github.event.label.name == 'ubuntuInstall::check' }} name: ubuntu-latest R release env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} @@ -114,40 +111,3 @@ jobs: devtools::build(pkg = '.', path = '${{ env.BUILD_LOC }}/abn.tar.gz', vignettes = FALSE) install.packages('${{ env.BUILD_LOC }}/abn.tar.gz', repos=NULL, type="source") shell: Rscript {0} - - report_Ubuntu_setup: - if: ${{ (success() || failure()) }} - needs: - - setup-and-install - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - repository-projects: write - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OWNER: ${{ github.repository_owner }} - REPO: ${{ github.event.repository.name }} - steps: - - uses: actions/checkout@v4 - - name: Check if on demand tasks succeeded - run: | - gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} - if [ ${{ needs.setup-and-install.result }} == "success" ]; then - gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} - gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} - echo "### ${{ github.event.label.url }} passed! :rocket:" >> $GITHUB_STEP_SUMMARY - exit 0 - elif [ ${{ needs.setup-and-install.result }} == "failure" ]; then - gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} - gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} - echo "### ${{ github.event.label.url }} failed!" >> $GITHUB_STEP_SUMMARY - exit 1 - else - gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} - echo "On demand task outcome was ${{ needs.setup-and-installoutcome }}" - fi - shell: bash - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - EVENT: ${{ github.event.number }} # This is either the issue or pr diff --git a/.github/workflows/onlabel_Windows_setup.yml b/.github/workflows/onlabel_Windows_setup.yml index 470cacac..d5ebad6c 100644 --- a/.github/workflows/onlabel_Windows_setup.yml +++ b/.github/workflows/onlabel_Windows_setup.yml @@ -3,13 +3,11 @@ name: Windows Install on: - pull_request: - types: [ labeled ] + push: + branches: + - "main" env: - LABEL_CHECK: 'windowsInstall::check' - LABEL_SUCCESS: 'windowsInstall::passed' - LABEL_FAILURE: 'windowsInstall::failed' BUILD_LOC: "./build" BRANCH: ${{ github.head_ref || github.ref_name }} JAGS_MAJORV: '4' @@ -24,7 +22,6 @@ permissions: jobs: setup-and-install: - if: ${{ github.event.label.name == 'windowsInstall::check' }} name: windows-latest R release runs-on: windows-latest env: @@ -97,40 +94,3 @@ jobs: devtools::build(pkg = '.', path = '${{ env.BUILD_LOC }}/abn.tar.gz', vignettes = FALSE) install.packages('${{ env.BUILD_LOC }}/abn.tar.gz', repos=NULL, type="source") shell: Rscript {0} - - report_Windows_setup: - if: ${{ (success() || failure()) }} - needs: - - setup-and-install - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - repository-projects: write - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OWNER: ${{ github.repository_owner }} - REPO: ${{ github.event.repository.name }} - steps: - - uses: actions/checkout@v4 - - name: Check if on demand tasks succeeded - run: | - gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} - if [ ${{ needs.setup-and-install.result }} == "success" ]; then - gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} - gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} - echo "### ${{ github.event.label.url }} passed! :rocket:" >> $GITHUB_STEP_SUMMARY - exit 0 - elif [ ${{ needs.setup-and-install.result }} == "failure" ]; then - gh pr edit ${{ env.EVENT }} --remove-label ${{ env.LABEL_SUCCESS }} --repo ${{ env.OWNER }}/${{ env.REPO }} - gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_FAILURE }} --repo ${{ env.OWNER }}/${{ env.REPO }} - echo "### ${{ github.event.label.url }} failed!" >> $GITHUB_STEP_SUMMARY - exit 1 - else - gh pr edit ${{ env.EVENT }} --add-label ${{ env.LABEL_CHECK }} --repo ${{ env.OWNER }}/${{ env.REPO }} - echo "On demand task outcome was ${{ needs.setup-and-install.outcome }}" - fi - shell: bash - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - EVENT: ${{ github.event.number }} # This is either the issue or pr