diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 6e44aebe..3db5cb0c 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -1,4 +1,8 @@ name: Build Docker image +# This workflow builds the conda-store-ui docker image for each +# pull request. This will ensure that no PR is breaking the docker +# image, which will be built and pushed to GHCR when a new release +# is cut. on: pull_request: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 78e06898..4d15775c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -178,6 +178,11 @@ jobs: with: images: | ${{ env.GH_CONTAINER_REGISTRY }}/${{ env.IMAGE_NAME }} + # ref: https://github.com/docker/metadata-action?tab=readme-ov-file#typeref + # create tags for: + # * the GH tag (eg. 2025.1.8) + # * the branch (eg. main) + # * the commit sha (eg. sha-860c190) tags: | type=ref,event=tag type=ref,event=branch @@ -193,6 +198,7 @@ jobs: ${{ steps.meta.outputs.tags }} push: true labels: ${{ steps.meta.outputs.labels }} + # ref https://docs.docker.com/build/ci/github-actions/cache/ cache-from: type=gha cache-to: type=gha,mode=max diff --git a/RELEASE.md b/RELEASE.md index bda6ff0a..14a6a0b8 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -4,6 +4,8 @@ 1. Create a new branch for the release `git checkout -b release-2024.9.1` 1. Clean the branch `git clean -fxdq` 1. Increment the version in `package.json` following our [version specification](https://conda.store/community/maintenance/release/#calver-details) + +## Part 1: Build and release the npm package 1. Build the package locally: ```bash @@ -35,6 +37,21 @@ If the dry run looks good, continue with the release checklist items. +## Part 2: Build and release the docker image + +1. Build the docker image: + + ```bash + docker build -t conda-incubator/conda-store-ui: --target prod . + ``` + +2. Push the image to [GitHub's container registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#pushing-container-images) + + ```bash + # ensure you are authenticated with github + docker push ghcr.io/conda-incubator/conda-store-ui: + ``` + ## Troubleshooting notes - If there are issues with the [GitHub Release UI](https://github.com/conda-incubator/conda-store-ui/releases/new), ensure that whatever code you published is checked into git, then tag and push both the commit and the tag: