Skip to content

Commit

Permalink
cleanup: update docker workflow
Browse files Browse the repository at this point in the history
Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
  • Loading branch information
kbdharun committed Dec 3, 2023
1 parent e3b08d3 commit 120a9d0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 49 deletions.
72 changes: 24 additions & 48 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,61 +15,40 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: kbdharun
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push to Docker
uses: docker/build-push-action@v5
with:
context: .
file: ./configs/Debian-DockerFile
push: true
tags: kbdharun/kasm-dev-debian:1.14.0

- name: Build the Docker image
run: docker image build -f configs/Debian-DockerFile -t docker.io/kbdharun/kasm-dev-debian:1.14.0 .

- name: Push To Docker Hub
run: |
docker login docker.io -u kbdharun -p ${{ secrets.DOCKER_TOKEN }}
docker image push "docker.io/kbdharun/kasm-dev-debian:1.14.0"
fedora-image-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: kbdharun
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push to Docker
uses: docker/build-push-action@v5
with:
context: .
file: ./configs/Fedora-DockerFile
push: true
tags: kbdharun/kasm-dev-fedora:1.14.0

- name: Build the Docker image
run: docker image build -f configs/Fedora-DockerFile -t docker.io/kbdharun/kasm-dev-fedora:1.14.0 .

- name: Push To Docker Hub
run: |
docker login docker.io -u kbdharun -p ${{ secrets.DOCKER_TOKEN }}
docker image push "docker.io/kbdharun/kasm-dev-fedora:1.14.0"
ubuntu-image-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: kbdharun
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push to Docker
uses: docker/build-push-action@v5
with:
context: .
file: ./configs/Ubuntu-DockerFile
push: true
tags: kbdharun/kasm-dev-ubuntu:1.14.0

- name: Build the Docker image
run: docker image build -f configs/Ubuntu-DockerFile -t docker.io/kbdharun/kasm-dev-ubuntu:1.14.0 .

- name: Push To Docker Hub
run: |
docker login docker.io kbdharun -p ${{ secrets.DOCKER_TOKEN }}
docker image push "docker.io/kbdharun/kasm-dev-ubuntu:1.14.0"
debian-image-ghcr:
runs-on: ubuntu-latest
Expand All @@ -79,7 +58,6 @@ jobs:
- name: Build the Docker image
run: docker image build -f configs/Debian-DockerFile -t ghcr.io/kbdharun/kasm-dev-debian:1.14.0 .

# Push the image to GHCR (Image Registry)
- name: Push To GHCR
run: |
docker login ghcr.io -u ${{ env.REGISTRY_USER }} -p ${{ env.REGISTRY_PASSWORD }}
Expand All @@ -93,7 +71,6 @@ jobs:
- name: Build the Docker image
run: docker image build -f configs/Fedora-DockerFile -t ghcr.io/kbdharun/kasm-dev-fedora:1.14.0 .

# Push the image to GHCR (Image Registry)
- name: Push To GHCR
run: |
docker login ghcr.io -u ${{ env.REGISTRY_USER }} -p ${{ env.REGISTRY_PASSWORD }}
Expand All @@ -107,7 +84,6 @@ jobs:
- name: Build the Docker image
run: docker image build -f configs/Ubuntu-DockerFile -t ghcr.io/kbdharun/kasm-dev-ubuntu:1.14.0 .

# Push the image to GHCR (Image Registry)
- name: Push To GHCR
run: |
docker login ghcr.io -u ${{ env.REGISTRY_USER }} -p ${{ env.REGISTRY_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion configs/Debian-DockerFile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN apt-get update && \
jupyter-notebook

# Install Linuxbrew
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install dependencies for NodeSource
RUN apt-get install -y ca-certificates curl gnupg && \
Expand Down

0 comments on commit 120a9d0

Please sign in to comment.