ci: build.
Some checks failed
Gitea Actions Demo / build (push) Failing after 41s

This commit is contained in:
Ivan Li 2023-05-22 15:13:07 +00:00
parent 688156bc59
commit e03372e787
2 changed files with 47 additions and 6 deletions

View File

@ -0,0 +1,45 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
{
"name": "Rust",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/rust:0-1-bullseye",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"customizations": {
"vscode": {
"extensions": [
"mhutchie.git-graph",
"donjayamanne.githistory",
"GitHub.copilot",
"eamodio.gitlens"
]
}
}
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
// "mounts": [
// {
// "source": "devcontainer-cargo-cache-${devcontainerId}",
// "target": "/usr/local/cargo",
// "type": "volume"
// }
// ]
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "rustc --version",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

View File

@ -44,7 +44,7 @@ jobs:
uses: https://github.com/Maxyme/get-release-or-tag@v2
- name: Build
run: cargo build --release
run: cargo build --target x86_64-unknown-linux-musl --release
- name: Log in to the Container registry
uses: https://github.com/docker/login-action@v2
@ -53,8 +53,6 @@ jobs:
username: ivan
password: 5a136cfb23816f0772ac8fc59ba4eec554fe9591
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: https://github.com/docker/metadata-action@v4
@ -68,8 +66,6 @@ jobs:
ACTIONS_RUNTIME_TOKEN: ''
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Deploy to Gitea
run: docker push --all-tags ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}