-
Notifications
You must be signed in to change notification settings - Fork 2
Versions and docs #301
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
Versions and docs #301
Changes from all commits
8eb8233
3433b53
319a8bd
b40d5b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,14 +3,19 @@ name: Create and publish web and proxy Docker images | |
|
|
||
| # manually trigger while testing | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| release: | ||
| types: [published] | ||
| workflow_dispatch: | ||
|
|
||
| # Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. | ||
| # Defines two custom environment variables for the workflow. These are used for the Container registry domain, and the tags on the web and proxy image. | ||
| env: | ||
| REGISTRY: ghcr.io | ||
| METADATA_TAGS: &metadata-tags | | ||
| type=sha | ||
| type=semver,pattern=v{{version}} | ||
| type=semver,pattern=v{{major}}.{{minor}} | ||
| type=semver,pattern=v{{major}} | ||
| type=raw,latest | ||
|
|
||
| jobs: | ||
| build-and-push-image: | ||
|
|
@@ -36,11 +41,20 @@ jobs: | |
| run: | | ||
| IMAGE_NAME=$(echo "${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]') | ||
| echo "IMAGE_NAME=${IMAGE_NAME}" >> $GITHUB_ENV | ||
| - name: Extract metadata (tags, labels) for Docker | ||
| id: meta | ||
|
|
||
| - name: Extract metadata (tags, labels) for Docker Web Image | ||
| id: meta-web | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/web | ||
| tags: *metadata-tags | ||
|
|
||
| - name: Extract metadata (tags, labels) for Docker Proxy Image | ||
| id: meta-proxy | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/proxy | ||
| tags: *metadata-tags | ||
| # This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages. | ||
| # It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see [Usage](https://github.com/docker/build-push-action#usage) in the README of the `docker/build-push-action` repository. | ||
| # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. | ||
|
|
@@ -55,8 +69,8 @@ jobs: | |
| context: ./TEKDB | ||
| file: ./TEKDB/Dockerfile | ||
| push: true | ||
| tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/web:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/web:${{ github.sha }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| tags: ${{ steps.meta-web.outputs.tags }} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is much cleaner and (I hope) also reduces required user-configuration of local .env files.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just for adding tags to docker images so that we have better observability of what versions folks are running. I'm hoping that this will be helpful as we have partners adopt docker deployment, we can debug with their exact docker image. |
||
| labels: ${{ steps.meta-web.outputs.labels }} | ||
| cache-from: type=gha,scope=ghcr-web | ||
| cache-to: type=gha,mode=max,scope=ghcr-web | ||
|
|
||
|
|
@@ -67,8 +81,8 @@ jobs: | |
| context: ./proxy | ||
| file: ./proxy/Dockerfile | ||
| push: true | ||
| tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/proxy:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/proxy:${{ github.sha }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| tags: ${{ steps.meta-proxy.outputs.tags }} | ||
| labels: ${{ steps.meta-proxy.outputs.labels }} | ||
| cache-from: type=gha,scope=ghcr-proxy | ||
| cache-to: type=gha,mode=max,scope=ghcr-proxy | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,50 @@ | ||
| # TEKDB | ||
| # TEKDB  | ||
|
|
||
| Traditional Ecological Knowledge Ethnographic Database Application | ||
|
|
||
| ## [Development Installation](https://github.com/Ecotrust/TEKDB/wiki/Development-Installation) | ||
|
|
||
| ## [Running Tests](https://github.com/Ecotrust/TEKDB/wiki/Running-tests) | ||
|
|
||
|  | ||
| ## Development Cycle | ||
|
|
||
| This project aims to follow a specific development cycle to ease collaboration and keep the different environments in sync. Below is a diagram of what the development lifecycle should look like: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a lot of content for README. I think it's great for an audience of potential contributors. Perhaps this content could be it's own doc and linked from here (as the others are linked). Separate from this, I'd love (when there's time) to think hard about what audience we want to reach with the README, and how to route that audience. Still - this is cool. I love flowcharts and this helps make the complexity far more readable. |
||
|
|
||
| ```mermaid | ||
| flowchart TB | ||
| subgraph Develop | ||
| CHECKOUT[checkout develop branch] --> FEAT[Create feature Branch] | ||
| FEAT --> PR[Submit Pull Request against develop branch] | ||
| PR --> APPROVE{Approval} | ||
| APPROVE -->|Approved| DEVMERGE[Merge into develop branch] | ||
| APPROVE -->|Rejected| REJECTED[Address feedback] | ||
| REJECTED --> APPROVE | ||
| end | ||
|
|
||
| subgraph Staging | ||
| DEVMERGE --> GHSTAGE[GitHub Action deploys to staging.itkdb.org] | ||
| GHSTAGE --> QA[QA on staging environment] | ||
| QA --> QAPASS{Passes QA} | ||
| end | ||
|
|
||
| subgraph Production | ||
| QAPASS -->|PASSES| PRVERSION[Create feature branch and open PR to update version in settings.py] | ||
| QAPASS -->|FAILS| FEAT | ||
| PRVERSION --> PRDEV[Merge into develop branch] | ||
| PRDEV --> PRMAIN[PR for develop into main] | ||
| PRMAIN --> PRMERGEMAIN[Merge into main branch] | ||
| PRMERGEMAIN --> RELEASE[Publish a new Release] | ||
| RELEASE --> GHPROD[GitHub Action builds and publishes images to GHCR] | ||
| GHPROD --> PRODDEPLOY[Manually deploy to demo.itkdb.org] | ||
| PRODDEPLOY --> QAPROD[Test in production] | ||
| QAPROD --> QAPASSPROD{Passes QA} | ||
| QAPASSPROD --> |PASSES| SUCCESS[Success!] | ||
| QAPASSPROD --> |Fails| HOTFIX[Create a hotfix branch off of main] | ||
| HOTFIX --> PRHOTFIX[PR for hotfix into main] | ||
| PRHOTFIX --> APPROVEHOTFIX{Approval} | ||
| APPROVEHOTFIX --> |Approval| MERGEHOTFIX[Merge into main branch] | ||
| APPROVEHOTFIX --> |Rejected| REJECTEDHOTFIX[Address feedback] | ||
| REJECTEDHOTFIX --> APPROVEHOTFIX | ||
| MERGEHOTFIX --> RELEASE | ||
| end | ||
| ``` | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works in wcbluepages. Keeping for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice if Copilot cited sources to read up on: