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

Containerize app (make a Docker image for matrix-public-archive) #22

Merged
merged 4 commits into from
Jun 15, 2022

Conversation

MadLittleMods
Copy link
Contributor

@MadLittleMods MadLittleMods commented Jun 15, 2022

Containerize app (make a Docker image for matrix-public-archive)

ghcr.io/matrix-org/matrix-public-archive/matrix-public-archive

... with a variety of tags!

Dev notes

@MadLittleMods MadLittleMods added the T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. label Jun 15, 2022
Comment on lines +54 to +67
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ steps.save_var.outputs.docker_image_name }}
# Defaults (as indicated by https://github.com/docker/metadata-action/tree/97c170d70b5f8bfc77e6b23e68381f217cb64ded#tags-input).
# Plus custom tags:
# - Full length sha
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha,format=long
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Re-introducing the docker/metadata-action so that we get nice tags for PRs, branches, and tags. It just does the right thing.

We additionally added type=sha,format=long the default list of tags so that we can still reference it in services below. The only change is that it uses the sha-xxx prefix for the commit sha tags.

@@ -47,21 +47,36 @@ jobs:
# the next job.
#
# via https://github.community/t/how-to-use-env-with-container-image/17252/25
- name: Save the Docker image name to a variable so we can share and re-use it in other jobs via `${{ needs.deploy-test-synapse-image.outputs.docker_image_name }}`
- name: Save the Docker image name to a variable so we can share and re-use it in other jobs via `${{ needs.build-test-synapse-image.outputs.docker_image_name }}`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing the tag from the end of the name so that we can re-use it in the metadata action.

We now specify this explicitly set this in the services which still works 🤷


# loggers:
# synapse.rest.media.v1.thumbnail_resource:
# level: DEBUG
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This isn't really related to this PR but was messing around with this on matrix-org/synapse#13016 and matrix-org/synapse#13039 and thought it was good reference whenever we want to add logging for something else down the line. Saves me from looking it up to copy-paste.

@MadLittleMods MadLittleMods marked this pull request as ready for review June 15, 2022 07:25
@MadLittleMods MadLittleMods merged commit 780600e into main Jun 15, 2022
MadLittleMods added a commit that referenced this pull request Jun 15, 2022
@MadLittleMods MadLittleMods deleted the madlittlemods/containerize-app branch April 26, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant