-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
106 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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,50 @@ | ||
name: docker | ||
|
||
on: | ||
push: | ||
tags: ["v*"] | ||
branches: ['docker-release'] | ||
workflow_dispatch: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
docker: | ||
name: docker-${{ matrix.flavor }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
flavor: | ||
- alpine | ||
- deb | ||
- github-actions | ||
- rpm | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ghcr.io/jdx/rtx:${{ matrix.flavor }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
file: packaging/${{ matrix.flavor }}/Dockerfile |
This file contains 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
This file contains 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,47 @@ | ||
FROM ubuntu | ||
LABEL maintainer="jdx" | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
|
||
RUN apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install -y \ | ||
bash \ | ||
build-essential \ | ||
ca-certificates \ | ||
curl \ | ||
direnv \ | ||
fish \ | ||
fd-find \ | ||
git \ | ||
gnupg \ | ||
libssl-dev \ | ||
pkg-config \ | ||
shellcheck \ | ||
shfmt \ | ||
sudo \ | ||
&& ln -s /usr/bin/{fdfind,fd} \ | ||
&& mkdir -p /etc/apt/keyrings \ | ||
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ | ||
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list \ | ||
&& apt-get update && apt-get install -y nodejs \ | ||
&& node -v \ | ||
&& npm i -g markdown-magic \ | ||
&& curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/bin \ | ||
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \ | ||
&& curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash \ | ||
&& rustup toolchain install nightly --component llvm-tools-preview \ | ||
&& rustup default stable \ | ||
&& cargo binstall -y \ | ||
cargo-deny \ | ||
cargo-llvm-cov \ | ||
cargo-machete \ | ||
cargo-msrv \ | ||
cross \ | ||
nextest \ | ||
zipsign \ | ||
&& apt-get clean \ | ||
&& rustc -vV \ | ||
&& cargo -V \ | ||
&& node -v \ | ||
&& npm -v \ | ||
&& just --version |
This file contains 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