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",
|
||||
"target": "${containerWorkspaceFolder}/target",
|
||||
"type": "volume"
|
||||
},
|
||||
{
|
||||
"source": "nix-store",
|
||||
"target": "/nix/store",
|
||||
"type": "volume"
|
||||
}
|
||||
],
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
|
@ -51,7 +56,8 @@
|
|||
"postAttachCommand": {
|
||||
"AddGitSafeDir": "git config --global --add safe.directory /workspaces/${containerWorkspaceFolderBasename}",
|
||||
"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.
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
|
|
25
.github/workflows/docker.yml
vendored
25
.github/workflows/docker.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Docker
|
||||
name: docker
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
|
@ -75,15 +75,14 @@ jobs:
|
|||
run: |
|
||||
echo "REPO=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
|
||||
|
||||
# Build and push Docker image with Buildx (don't push on PR)
|
||||
# https://github.com/docker/build-push-action
|
||||
- name: Build and push Docker image
|
||||
id: build-and-push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./result
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ env.REGISTRY }}/${{ env.REPO }}:latest
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
- name: Strip REPO Username
|
||||
run: |
|
||||
STRIP_REPO_USERNAME=$(echo "${{ env.REPO }}" | sed 's/nexveridian\///')
|
||||
echo "STRIP_REPO_USERNAME=${STRIP_REPO_USERNAME}" >> ${GITHUB_ENV}
|
||||
|
||||
# https://github.com/docker/build-push-action/issues/538
|
||||
- name: Push and tag Docker image
|
||||
run: |
|
||||
docker load < result
|
||||
docker tag ${{ env.STRIP_REPO_USERNAME }}:latest ${{ env.REGISTRY }}/${{ env.REPO }}:latest
|
||||
docker push ${{ env.REGISTRY }}/${{ env.REPO }}:latest
|
||||
|
|
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -1725,9 +1725,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.5.1"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e"
|
||||
checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd"
|
||||
dependencies = [
|
||||
"bitflags 2.5.0",
|
||||
]
|
||||
|
|
|
@ -73,7 +73,8 @@
|
|||
tag = "latest";
|
||||
copyToRoot = [ my-crate ];
|
||||
config = {
|
||||
Cmd = [ "${my-crate}/bin/ark-invest-api-rust" ];
|
||||
Cmd = [ "./ark-invest-api-rust" ];
|
||||
WorkingDir = "${my-crate}/ark-invest-api-rust";
|
||||
Env = [ "PORT=3000" ];
|
||||
Expose = [ 3000 ];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue