-
-
Notifications
You must be signed in to change notification settings - Fork 247
支持Github Actions 自动构建 Docker File 自动上传到 Github pkg #62
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
Open
KyoSakuyo
wants to merge
21
commits into
pacexy:main
Choose a base branch
from
KyoSakuyo:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+53
−3
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
6170dd3
Create docker-image.yml
KyoSakuyo c0a6b93
Update docker-image.yml
KyoSakuyo f85413d
Update docker-image.yml
KyoSakuyo 6a1a588
Update docker-image.yml
KyoSakuyo f91cb67
Update Dockerfile
KyoSakuyo bead148
Update Dockerfile
KyoSakuyo 4bc5441
Update Dockerfile
KyoSakuyo 488f3fd
Update .npmrc
KyoSakuyo 04f7bd8
Update .npmrc
KyoSakuyo f9786b4
Update Dockerfile
KyoSakuyo 914d8bb
Update Dockerfile
KyoSakuyo b617a38
Update .npmrc
KyoSakuyo 0841c7f
Update Dockerfile
KyoSakuyo dc45d48
Update Dockerfile
KyoSakuyo 2f39005
Update docker-image.yml
KyoSakuyo a46b0a5
Update Dockerfile
KyoSakuyo ee99a49
Update docker-image.yml
KyoSakuyo 165d94c
Update docker-image.yml
KyoSakuyo 7b23abe
Update Dockerfile
KyoSakuyo 093ef7d
Update docker-image.yml
KyoSakuyo 2e8de4e
Update docker-image.yml
KyoSakuyo 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 |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: build & push docker container | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| tags: | ||
| - '*' | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| jobs: | ||
| docker: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
| - name: Docker meta | ||
| id: metal | ||
| uses: docker/metadata-action@v4 | ||
| with: | ||
| images: | | ||
| ghcr.io/${{ github.repository }} | ||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v2 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v2 | ||
| - name: Login to GitHub Container Registry | ||
| if: github.event_name != 'pull_request' | ||
| uses: docker/login-action@v2 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Build and push | ||
| uses: docker/build-push-action@v3 | ||
| with: | ||
| context: . | ||
| platforms: linux/amd64 | ||
| push: ${{ github.event_name != 'pull_request' }} | ||
| tags: ${{ steps.metal.outputs.tags }} | ||
| labels: ${{ steps.metal.outputs.labels }} | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max |
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 |
|---|---|---|
| @@ -1,2 +1,4 @@ | ||
| # https://github.com/remix-run/remix/issues/154#issuecomment-978359765 | ||
| # shamefully-hoist=true | ||
| shamefully-hoist=true | ||
| strict-peer-dependencies=false | ||
| shell-emulator=true | ||
| ignore-workspace-root-check=true |
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 |
|---|---|---|
|
|
@@ -22,7 +22,9 @@ COPY .gitignore .gitignore | |
| COPY --from=builder /app/out/json/ . | ||
| COPY --from=builder /app/out/pnpm-*.yaml . | ||
| RUN corepack enable | ||
| RUN pnpm i --frozen-lockfile | ||
| RUN corepack prepare [email protected] --activate | ||
|
|
||
| RUN pnpm install --no-frozen-lockfile | ||
|
|
||
| # Build the project | ||
| COPY --from=builder /app/out/full/ . | ||
|
|
||
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.
Using --no-frozen-lockfile in Docker builds can lead to non-reproducible builds and potential security vulnerabilities. Consider using --frozen-lockfile for production Docker images to ensure consistent dependency versions.