diff --git a/.github/linters/.lycheeignore b/.github/linters/.lycheeignore index 3979335..e6df5f6 100644 --- a/.github/linters/.lycheeignore +++ b/.github/linters/.lycheeignore @@ -1,4 +1,6 @@ # Dead irrelevant path in pkgdown/favicon http://svgjs.dev/svgjs # Path to RSPM yet to be derived -https://packagemanager.posit.co/cran/$%7B%7Bmatrix.config.date +https://packagemanager.posit.co/cran/\$ +# Paths to workflows yet to be derived +https://raw.githubusercontent.com/NovoNordisk-OpenSource/r.workflows/\$ diff --git a/.github/linters/.mega-linter.yml b/.github/linters/.mega-linter.yml index 10a2b4b..3badd80 100644 --- a/.github/linters/.mega-linter.yml +++ b/.github/linters/.mega-linter.yml @@ -5,7 +5,7 @@ DISABLE_LINTERS: ADDITIONAL_EXCLUDED_DIRECTORIES: - dev REPOSITORY_KICS_ARGUMENTS: "--exclude-queries 555ab8f9-2001-455e-a077-f2d0f41e2fb9" -SPELL_LYCHEE_ARGUMENTS: "--exclude-path man/figures --exclude-path docs --exclude-path pkgdown/favicon" +SPELL_LYCHEE_ARGUMENTS: "--exclude-path man/figures --exclude-path docs --exclude-path pkgdown/favicon --exclude-path .lycheeignore --exclude-path .github/linters/.lycheeignore" SPELL_LYCHEE_FILE_EXTENSIONS: - "*" SPELL_CSPELL_ANALYZE_FILE_NAMES: false diff --git a/.github/workflows/check_nn_versions.yaml b/.github/workflows/check_nn_versions.yaml index 0db8be4..af1db7f 100644 --- a/.github/workflows/check_nn_versions.yaml +++ b/.github/workflows/check_nn_versions.yaml @@ -54,7 +54,7 @@ jobs: - name: Install dependencies run: > options( - repos = c(CRAN = "https://packagemanager.posit.co/cran/${{matrix.config.date }}") + repos = c(CRAN = "https://packagemanager.posit.co/cran/${{matrix.config.date}}") ) install.packages(c("rcmdcheck", "pak"), Ncpus = parallel::detectCores()-1) diff --git a/.github/workflows/megalinter.yaml b/.github/workflows/megalinter.yaml index 9c1e8f5..c3cd6c1 100644 --- a/.github/workflows/megalinter.yaml +++ b/.github/workflows/megalinter.yaml @@ -31,13 +31,26 @@ jobs: - name: Copy linting config from r.workflows/main shell: bash run: | - curl --output .mega-linter.yml https://raw.githubusercontent.com/NovoNordisk-OpenSource/r.workflows/main/.github/linters/.mega-linter.yml - curl --output .lintr https://raw.githubusercontent.com/NovoNordisk-OpenSource/r.workflows/main/.github/linters/.lintr - curl --output .lycheeignore https://raw.githubusercontent.com/NovoNordisk-OpenSource/r.workflows/main/.github/linters/.lycheeignore + echo =========== + echo "$GITHUB_REPOSITORY" + echo "$GITHUB_HEAD_REF" + echo "$GITHUB_REF_NAME" + echo =========== + if [ "$GITHUB_REPOSITORY" = "NovoNordisk-OpenSource/r.workflows" ]; then + workflow_branch="${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}" + echo ========= + echo Using "${workflow_branch}" + echo ========= + else + workflow_branch="main" + fi + curl --output .mega-linter.yml "https://raw.githubusercontent.com/NovoNordisk-OpenSource/r.workflows/${workflow_branch}/.github/linters/.mega-linter.yml" + curl --output .lintr "https://raw.githubusercontent.com/NovoNordisk-OpenSource/r.workflows/${workflow_branch}/.github/linters/.lintr" + curl --output .lycheeignore "https://raw.githubusercontent.com/NovoNordisk-OpenSource/r.workflows/${workflow_branch}/.github/linters/.lycheeignore" if [ -e "inst/WORDLIST" ]; then - curl --output .cspell.json https://raw.githubusercontent.com/NovoNordisk-OpenSource/r.workflows/main/.github/linters/.cspell-wordlist.json + curl --output .cspell.json "https://raw.githubusercontent.com/NovoNordisk-OpenSource/r.workflows/${workflow_branch}/.github/linters/.cspell-wordlist.json" else - curl --output .cspell.json https://raw.githubusercontent.com/NovoNordisk-OpenSource/r.workflows/main/.github/linters/.cspell.json + curl --output .cspell.json "https://raw.githubusercontent.com/NovoNordisk-OpenSource/r.workflows/${workflow_branch}/.github/linters/.cspell.json" fi - name: MegaLinter id: ml diff --git a/DESCRIPTION b/DESCRIPTION index 2933c0a..d0ee0ab 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: r.workflows Title: R package workflows -Version: 0.0.1.9001 +Version: 0.0.1.9002 Authors@R: c( person("Cervan", "Girard", , "cgid@novonordisk.com", role = c("aut", "cre")), person("Aksel", "Thomsen", , "oath@novonordisk.com", role = c("aut"))