-
Notifications
You must be signed in to change notification settings - Fork 1
feat/docker #6
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
feat/docker #6
Changes from all commits
562d1bc
a91a37a
9e50c81
adde66e
cd200d2
ea5190f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Rust build artifacts | ||
| **/*.rs.bk | ||
| *.pdb | ||
|
|
||
| # Docker specific | ||
| Dockerfile* | ||
| docker-compose* | ||
| .docker/ | ||
|
|
||
| # Git and version control | ||
| .git* | ||
|
|
||
| # Documentation | ||
| /docs | ||
|
|
||
| # Project build files | ||
| Cargo.lock | ||
| **/.cargo-ok | ||
|
|
||
| # Test artifacts | ||
| **/*test-* | ||
| **/*Test* | ||
|
|
||
| # Editor configs | ||
| .editorconfig | ||
|
|
||
| /target | ||
| /.idea | ||
| *~ | ||
| Thumbs.db | ||
| .DS* | ||
| /.vscode/*.log | ||
| .*~ |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,48 @@ | ||||||||||||||||||||||||||||||||||||||||||
| name: Create and publish a Docker image | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||||||
| branches: ["main"] | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||
| REGISTRY: ghcr.io | ||||||||||||||||||||||||||||||||||||||||||
| IMAGE_NAME: ${{ github.repository }} | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||
| build-and-push-image: | ||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||||||
| contents: read | ||||||||||||||||||||||||||||||||||||||||||
| packages: write | ||||||||||||||||||||||||||||||||||||||||||
| attestations: write | ||||||||||||||||||||||||||||||||||||||||||
| id-token: write | ||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||
| - name: Checkout repository | ||||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||
| - name: Log in to the Container registry | ||||||||||||||||||||||||||||||||||||||||||
| uses: docker/login-action | ||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||
| registry: ${{ env.REGISTRY }} | ||||||||||||||||||||||||||||||||||||||||||
| username: ${{ github.actor }} | ||||||||||||||||||||||||||||||||||||||||||
| password: ${{ secrets.REPO_PASSWD }} | ||||||||||||||||||||||||||||||||||||||||||
| - name: Extract metadata (tags, labels) for Docker | ||||||||||||||||||||||||||||||||||||||||||
| id: meta | ||||||||||||||||||||||||||||||||||||||||||
| uses: docker/metadata-action@v3 | ||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+29
to
+32
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. 🛠️ Refactor suggestion Update docker/metadata-action to a Newer Version - uses: docker/metadata-action@v3
+ uses: docker/metadata-action@v4📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.4)30-30: the runner of "docker/metadata-action@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) |
||||||||||||||||||||||||||||||||||||||||||
| - name: Build and push Docker image | ||||||||||||||||||||||||||||||||||||||||||
| id: push | ||||||||||||||||||||||||||||||||||||||||||
| uses: docker/build-push-action@v2 | ||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||
| context: . | ||||||||||||||||||||||||||||||||||||||||||
| push: true | ||||||||||||||||||||||||||||||||||||||||||
| tags: | | ||||||||||||||||||||||||||||||||||||||||||
| latest | ||||||||||||||||||||||||||||||||||||||||||
| ${{ steps.meta.outputs.tags }} | ||||||||||||||||||||||||||||||||||||||||||
| labels: ${{ steps.meta.outputs.labels }} | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+33
to
+42
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. 🛠️ Refactor suggestion Upgrade docker/build-push-action Version - uses: docker/build-push-action@v2
+ uses: docker/build-push-action@v4📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.4)35-35: the runner of "docker/build-push-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) |
||||||||||||||||||||||||||||||||||||||||||
| - name: Generate artifact attestation | ||||||||||||||||||||||||||||||||||||||||||
| uses: actions/attest-build-provenance@v2 | ||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||
| subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} | ||||||||||||||||||||||||||||||||||||||||||
| subject-digest: ${{ steps.push.outputs.digest }} | ||||||||||||||||||||||||||||||||||||||||||
| push-to-registry: true | ||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ | |
| # File Created: 2025-03-05 11:10:40 | ||
| # | ||
| # Modified By: mingcheng ([email protected]) | ||
| # Last Modified: 2025-03-05 17:42:51 | ||
| # Last Modified: 2025-03-17 18:29:18 | ||
| ## | ||
|
|
||
| name: Cargo Build & Test | ||
|
|
||
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.
🛠️ Refactor suggestion
Specify Version for docker/login-action
The static analysis tool indicates that the action reference does not include a version. This may lead to unpredictable behavior. Please update the reference to include a version tag, for example:
📝 Committable suggestion
🧰 Tools
🪛 actionlint (1.7.4)
23-23: specifying action "docker/login-action" in invalid format because ref is missing. available formats are "{owner}/{repo}@{ref}" or "{owner}/{repo}/{path}@{ref}"
(action)