-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move from ubuntu_dev to a deno image
- Loading branch information
1 parent
375faf7
commit bebf9be
Showing
4 changed files
with
71 additions
and
18 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,45 @@ | ||
name: Build and Push Deno Images | ||
on: | ||
push: | ||
branches-ignore: | ||
- none | ||
paths: | ||
- "deno/**" | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: self-hosted | ||
timeout-minutes: 180 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- { dockerfile: "deno/Dockerfile", context: "deno", image_name: "deno", tag_name: "latest" } | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Set tag name based on branch | ||
id: set_tag | ||
run: | | ||
if [[ "${{ github.ref_name }}" == "master" ]]; then | ||
echo "tag=${{ matrix.config.tag_name }}" >> $GITHUB_OUTPUT | ||
else | ||
GITHUB_REFNAME=${{ github.ref_name }} | ||
BRANCH_NAME=${GITHUB_REFNAME//\//_} | ||
echo "tag=${{ matrix.config.tag_name }}-$BRANCH_NAME" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ${{ matrix.config.context }} | ||
file: ${{ matrix.config.dockerfile }} | ||
platforms: linux/amd64,linux/arm64/v8 | ||
push: true | ||
tags: hivesolutions/${{ matrix.config.image_name }}:${{ steps.set_tag.outputs.tag }} |
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,21 @@ | ||
FROM hivesolutions/ubuntu:latest | ||
|
||
LABEL version="1.0" | ||
LABEL maintainer="Hive Solutions <[email protected]>" | ||
|
||
ENV RUST_VERSION 1.73.0 | ||
ENV CARGO_HOME /usr/local/cargo | ||
ENV PATH $CARGO_HOME/bin:$PATH | ||
|
||
ENV DENO_VERSION 1.37.1 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && apt-get install -y -q --no-install-recommends build-essential curl clang\ | ||
cmake libglib2.0-dev lld protobuf-compiler &&\ | ||
curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain $RUST_VERSION -y &&\ | ||
/usr/local/cargo/bin/cargo install --locked --version $DENO_VERSION deno &&\ | ||
apt-get remove -y build-essential clang cmake libglib2.0-dev lld protobuf-compiler && apt-get autoremove -y &&\ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
CMD ["/bin/bash"] |
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 |
---|---|---|
|
@@ -3,24 +3,11 @@ FROM hivesolutions/ubuntu:latest | |
LABEL version="1.0" | ||
LABEL maintainer="Hive Solutions <[email protected]>" | ||
|
||
ENV RUST_VERSION 1.73.0 | ||
ENV CARGO_HOME /usr/local/cargo | ||
ENV PATH $CARGO_HOME/bin:$PATH | ||
|
||
ENV DENO_VERSION 1.37.1 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && apt-get install -y -q --no-install-recommends sudo gcc make curl pypy\ | ||
linux-headers-generic libssl-dev python2-dev python3-dev pypy-dev &&\ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain $RUST_VERSION -y | ||
|
||
RUN apt-get update && apt-get install -y -q --no-install-recommends build-essential clang\ | ||
cmake libglib2.0-dev lld protobuf-compiler &&\ | ||
/usr/local/cargo/bin/cargo install --locked --version $DENO_VERSION deno &&\ | ||
apt-get remove -y build-essential clang cmake libglib2.0-dev lld protobuf-compiler && apt-get autoremove -y &&\ | ||
RUN apt-get update &&\ | ||
apt-get install -y -q --no-install-recommends sudo gcc make curl pypy linux-headers-generic\ | ||
libssl-dev python2-dev python3-dev pypy-dev &&\ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
CMD ["/bin/bash"] |