forked from misskey-dev/misskey
-
Notifications
You must be signed in to change notification settings - Fork 14
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
コンテナイメージのビルド & 保管をGitHub Container Registryにする #77
Merged
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
3639390
Add ghcr push (experimental)
Laica-Lunasys b6af3ab
Fix typo :p
Laica-Lunasys eb71aa8
Format image tags :thinking_face:
Laica-Lunasys 69711f8
Format image tags (2) :thinking_face:
Laica-Lunasys 2331483
Remove build.yaml
Laica-Lunasys e2d0fbb
Rewrite github actions (from original build workflow)
Laica-Lunasys 242b891
Fix step name (Docker Hub -> GitHub Container Registry)
Laica-Lunasys 08d2ca9
Disable arm build
Laica-Lunasys defe9d7
Test cached build
Laica-Lunasys 5db1c74
Remove test trigger
Laica-Lunasys c22f5fb
Fix tags resolution (maybe)
Laica-Lunasys 7861769
Fix tags resolution (2) (maybe)
Laica-Lunasys 74fc946
Rename .yaml -> .yml
Laica-Lunasys 385be64
Fix setup-buildx-action version
Laica-Lunasys File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Publish Docker image (io) | ||
|
||
on: | ||
push: | ||
tags: | ||
- "**" | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to GitHub Container Registry | ||
runs-on: ubuntu-22.04 | ||
if: github.repository == 'MisskeyIO/misskey' | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/[email protected] | ||
Laica-Lunasys marked this conversation as resolved.
Show resolved
Hide resolved
|
||
with: | ||
platforms: linux/amd64 | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ghcr.io/misskeyio/misskey | ||
- name: Log in to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Prepare image tags | ||
run: | | ||
echo "FORMATTED_BRANCH_NAME=$(echo ${{ github.ref_name }} | sed -e 's/\//-/g' )" >> $GITHUB_ENV | ||
Comment on lines
+34
to
+36
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. イメージタグにブランチ名を使うようにしてる。 |
||
- name: Build and Push to GitHub Container Registry | ||
uses: docker/build-push-action@v4 | ||
with: | ||
builder: ${{ steps.buildx.outputs.name }} | ||
context: . | ||
push: true | ||
platforms: ${{ steps.buildx.outputs.platforms }} | ||
provenance: false | ||
labels: ${{ env.FORMATTED_BRANCH_NAME }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
tags: | | ||
ghcr.io/misskeyio/misskey:latest | ||
ghcr.io/misskeyio/misskey:${{ env.FORMATTED_BRANCH_NAME }} | ||
Comment on lines
+49
to
+50
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.
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
latest
を使うとlatestで使用されるバージョンが変わると厄介するかもしれないので。