-
Notifications
You must be signed in to change notification settings - Fork 1
GitHub Container Registry へ push するようにしてみる #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
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
d1b4d3e
GitHub Container Registry へ push するようにしてみる
rokuosan 6b54b3a
root からの相対パスだった
rokuosan c592c9d
provenance はオフにしておく
rokuosan 74c13f9
試しに push してみる
rokuosan eaa86c1
permission を与える
rokuosan 649a149
push できそうだったので元に戻す
rokuosan c272a01
タグに日付を入れてみる
rokuosan d6212a4
OCI の Image spec に従う
rokuosan c13731d
fix: fix typo
rokuosan 1c3d503
ブランチ名は入れない
rokuosan 2cff67b
デフォルトブランチの時だけlatestをつける
rokuosan c515d34
タグが常に変わるのでpushする
rokuosan 8a6f737
コメントを書いておく
rokuosan fe3acc3
commit-date ではなく date
rokuosan 0b16b19
timezoneを指定してみる
rokuosan 36471b0
書式を変えてみる
rokuosan 97b8c0d
date にしてみる。これが無理なら諦める
rokuosan 091fc66
諦めてLabelに作成日時は含めない
rokuosan 4d6b6da
イメージ名を変更
rokuosan 2d0ee3f
owner はなくてもよかった
rokuosan 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 hidden or 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 |
---|---|---|
|
@@ -38,3 +38,55 @@ jobs: | |
run: npm run lint -w packages/akane-next | ||
- name: Test | ||
run: npm run test -w packages/akane-next | ||
- name: Build | ||
run: npm run build -w packages/akane-next | ||
|
||
build-and-push: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
permissions: | ||
contents: read | ||
pull-requests: read | ||
id-token: write | ||
actions: write | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: docker/metadata-action@v4 | ||
id: meta | ||
with: | ||
images: ghcr.io/${{ github.repository }}/akane-next | ||
# デフォルトブランチの時だけ latest タグをつけてそれ以外は日時とコミットハッシュをつける | ||
# ref: https://github.com/docker/metadata-action?tab=readme-ov-file#customizing | ||
tags: | | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
type=raw,value={{date 'YYYYMMDD-HHmmss' tz='Asia/Tokyo'}}-{{sha}} | ||
# Open Container Initiative (OCI) の Image Spec に基づくラベル | ||
# ref: | ||
# - https://github.com/opencontainers/image-spec/blob/fbb4662eb53b80bd38f7597406cf1211317768f0/annotations.md?plain=1#L18-L26 | ||
labels: | | ||
org.opencontainers.image.authors="rokuosan, taiseiue, nenrinyear, Retasusan, ikotome" | ||
org.opencontainers.image.url="https://github.com/kc3hack/2025_9" | ||
org.opencontainers.image.documentation="https://github.com/kc3hack/2025_9" | ||
org.opencontainers.image.source="https://github.com/kc3hack/2025_9" | ||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ./packages/akane-next | ||
file: ./docker/akane-next/Dockerfile | ||
platforms: linux/amd64 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: true | ||
provenance: false | ||
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. [メモ] GitHub Container Registryへの対応のため、暫定的に |
||
env: | ||
NODE_ENV: production | ||
- name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
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.
[コメント] 外部の標準への準拠助かります。他の人がコードやイメージを見直したときに伝わりやすくなります😊