Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap repository for v1.0.0 #1

Merged
merged 11 commits into from
Apr 25, 2024
Merged

Bootstrap repository for v1.0.0 #1

merged 11 commits into from
Apr 25, 2024

Conversation

nwiltsie
Copy link
Member

@nwiltsie nwiltsie commented Apr 23, 2024

Description

Continuing on from the discussion in https://github.com/uclahs-cds/group-infrastructure/discussions/62#discussioncomment-9135287, this repository is the new home of the build-and-deploy-docs action from https://github.com/uclahs-cds/tool-Nextflow-action.

Nearly all of the code in the PR is identical to the old action, with a few tweaks that I'll detail below.

Substantial Changes

I wanted to include the actions/checkout step inside this action, but as the original was a Docker container action there was not a simple mechanism to add that in.

To work around that, I modified this example and buried the original action into an internal-action folder. Then, I added a new wrapper composite action with the same arguments that ran actions/checkout before calling the internal-action.

Similar to the discussion in uclahs-cds/tool-static-analysis#1 (comment) (composite actions can't access the github context), that does require copying the internal-action folder into the .git/ folder of the calling repository to work.

runs:
using: "composite"
steps:
- uses: actions/checkout@v4
- shell: bash
run: cp -r '${{ github.action_path }}/internal-action' .git/
- uses: ./.git/internal-action
with:
readme: ${{ inputs.readme }}
mkdocs_config: ${{ inputs.mkdocs_config }}

The only file that needed to be changed to make this work was the (not actually involved with the action) helper script backfill.py:

--- tool-Nextflow-action/build-and-deploy-docs/backfill.py	2024-03-07 13:10:16
+++ tool-generate-docs/internal-action/backfill.py	2024-04-23 14:01:58
@@ -134,6 +134,7 @@

     checkrun(
         ["docker", "build", ".", "-t", image],
+        cwd=Path(__file__).parent,
         context="building Docker image"
     )

The rest of the copied files are identical:

  • Dockerfile
  • action.py
  • create_mkdocs_config.py
  • requirements.txt
  • action.yml

Checklist

  • This PR does NOT contain Protected Health Information (PHI). A repo may need to be deleted if such data is uploaded.
    Disclosing PHI is a major problem1 - Even a small leak can be costly2.

  • This PR does NOT contain germline genetic data3, RNA-Seq, DNA methylation, microbiome or other molecular data4.

  • This PR does NOT contain other non-plain text files, such as: compressed files, images (e.g. .png, .jpeg), .pdf, .RData, .xlsx, .doc, .ppt, or other output files.

  To automatically exclude such files using a .gitignore file, see here for example.

  • I have read the code review guidelines and the code review best practice on GitHub check-list.

  • I have set up or verified the main branch protection rule following the github standards before opening this pull request.

  • The name of the branch is meaningful and well formatted following the standards, using [AD_username (or 5 letters of AD if AD is too long)]-[brief_description_of_branch].

  • I have added the major changes included in this pull request to the CHANGELOG.md under the next release version or unreleased, and updated the date.

Footnotes

  1. UCLA Health reaches $7.5m settlement over 2015 breach of 4.5m patient records

  2. The average healthcare data breach costs $2.2 million, despite the majority of breaches releasing fewer than 500 records.

  3. Genetic information is considered PHI.
    Forensic assays can identify patients with as few as 21 SNPs

  4. RNA-Seq, DNA methylation, microbiome, or other molecular data can be used to predict genotypes (PHI) and reveal a patient's identity.

@nwiltsie nwiltsie requested a review from a team April 23, 2024 21:55
@wiz-inc-8da00b022c
Copy link

wiz-inc-8da00b022c bot commented Apr 23, 2024

Wiz Scan Summary

IaC Misconfigurations 0C 1H 0M 1L 0I
Vulnerabilities 0C 0H 0M 0L 0I
Sensitive Data 0C 0H 0M 0L 0I
Total 0C 1H 0M 1L 0I
Secrets 0🔑

@nwiltsie
Copy link
Member Author

nwiltsie commented Apr 23, 2024

Ignore Wiz, it's wrong:

Docker actions must be run by the default Docker user (root). Do not use the USER instruction in your Dockerfile, because you won't be able to access the GITHUB_WORKSPACE directory. For more information, see "Variables" and USER reference in the Docker documentation.

Copy link

@yashpatel6 yashpatel6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment but otherwise looks good!

README.md Outdated Show resolved Hide resolved
@nwiltsie nwiltsie merged commit 2bffe63 into main Apr 25, 2024
5 checks passed
@nwiltsie nwiltsie deleted the nwiltsie-bootstrap branch April 25, 2024 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants