mirror of
https://github.com/NexVeridian/ark-invest-api-rust.git
synced 2025-09-02 01:49:11 +00:00
fix: docker push
This commit is contained in:
parent
c2267a4bea
commit
486ed4c958
4 changed files with 24 additions and 18 deletions
|
@ -27,6 +27,11 @@
|
||||||
"source": "${localWorkspaceFolderBasename}-target",
|
"source": "${localWorkspaceFolderBasename}-target",
|
||||||
"target": "${containerWorkspaceFolder}/target",
|
"target": "${containerWorkspaceFolder}/target",
|
||||||
"type": "volume"
|
"type": "volume"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "nix-store",
|
||||||
|
"target": "/nix/store",
|
||||||
|
"type": "volume"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
|
@ -51,7 +56,8 @@
|
||||||
"postAttachCommand": {
|
"postAttachCommand": {
|
||||||
"AddGitSafeDir": "git config --global --add safe.directory /workspaces/${containerWorkspaceFolderBasename}",
|
"AddGitSafeDir": "git config --global --add safe.directory /workspaces/${containerWorkspaceFolderBasename}",
|
||||||
"update": "rustup target add x86_64-unknown-linux-musl && rustup update && cargo update",
|
"update": "rustup target add x86_64-unknown-linux-musl && rustup update && cargo update",
|
||||||
"clippy": "cargo clippy --fix --allow-dirty"
|
"clippy": "cargo clippy --fix --allow-dirty",
|
||||||
|
"nix flake update": "nix flake update"
|
||||||
},
|
},
|
||||||
// Configure tool-specific properties.
|
// Configure tool-specific properties.
|
||||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||||
|
|
27
.github/workflows/docker.yml
vendored
27
.github/workflows/docker.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: Docker
|
name: docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
|
@ -73,17 +73,16 @@ jobs:
|
||||||
# https://github.com/orgs/community/discussions/25768#discussioncomment-3249183
|
# https://github.com/orgs/community/discussions/25768#discussioncomment-3249183
|
||||||
- name: Downcase REPO
|
- name: Downcase REPO
|
||||||
run: |
|
run: |
|
||||||
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
|
echo "REPO=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
|
||||||
|
|
||||||
# Build and push Docker image with Buildx (don't push on PR)
|
- name: Strip REPO Username
|
||||||
# https://github.com/docker/build-push-action
|
run: |
|
||||||
- name: Build and push Docker image
|
STRIP_REPO_USERNAME=$(echo "${{ env.REPO }}" | sed 's/nexveridian\///')
|
||||||
id: build-and-push
|
echo "STRIP_REPO_USERNAME=${STRIP_REPO_USERNAME}" >> ${GITHUB_ENV}
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
# https://github.com/docker/build-push-action/issues/538
|
||||||
context: ./result
|
- name: Push and tag Docker image
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
run: |
|
||||||
tags: ${{ env.REGISTRY }}/${{ env.REPO }}:latest
|
docker load < result
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
docker tag ${{ env.STRIP_REPO_USERNAME }}:latest ${{ env.REGISTRY }}/${{ env.REPO }}:latest
|
||||||
cache-from: type=gha
|
docker push ${{ env.REGISTRY }}/${{ env.REPO }}:latest
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
|
|
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -1725,9 +1725,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "redox_syscall"
|
name = "redox_syscall"
|
||||||
version = "0.5.1"
|
version = "0.5.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e"
|
checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.5.0",
|
"bitflags 2.5.0",
|
||||||
]
|
]
|
||||||
|
|
|
@ -73,7 +73,8 @@
|
||||||
tag = "latest";
|
tag = "latest";
|
||||||
copyToRoot = [ my-crate ];
|
copyToRoot = [ my-crate ];
|
||||||
config = {
|
config = {
|
||||||
Cmd = [ "${my-crate}/bin/ark-invest-api-rust" ];
|
Cmd = [ "./ark-invest-api-rust" ];
|
||||||
|
WorkingDir = "${my-crate}/ark-invest-api-rust";
|
||||||
Env = [ "PORT=3000" ];
|
Env = [ "PORT=3000" ];
|
||||||
Expose = [ 3000 ];
|
Expose = [ 3000 ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue