Skip to content

Commit

Permalink
Add ansible to desk
Browse files Browse the repository at this point in the history
  • Loading branch information
shikharbhardwaj committed Jun 9, 2024
1 parent ea1e078 commit 5e50dbb
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 25 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/default-workspace-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Desk docker image CI

on:
release:
types: [published]

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:

- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}


- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: bluefog/desk

- name: Build and push Docker image
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./workspaces/default-workspace/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}


- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

23 changes: 0 additions & 23 deletions .github/workflows/docker-image.yml

This file was deleted.

8 changes: 6 additions & 2 deletions workspaces/default-workspace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ USER root
RUN apt-get update && apt-get install -y build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \
libncursesw5-dev xz-utils libffi-dev liblzma-dev python-openssl gdb tree \
redis-server zsh vim-tiny lld clang pkg-config libssl-dev postgresql

redis-server zsh vim-tiny lld clang pkg-config libssl-dev postgresql pipx

RUN chsh -s $(which zsh) coder

# Install pipx
RUN pipx ensurepath
RUN pipx ensurepath --global
RUN pipx install --include-deps ansible

WORKDIR /home/coder

ADD . /home/coder/dotfiles
Expand Down

0 comments on commit 5e50dbb

Please sign in to comment.