Skip to content

Commit

Permalink
Feat/enigma (#9)
Browse files Browse the repository at this point in the history
* Update Dockerfile

* Update Dockerfile

* testing enigma workflow

* Update enigma-docker.yml

* test

* Update enigma-docker.yml

* test

* Update enigma-docker.yml

* Update enigma-docker.yml

* Update enigma-docker.yml removed commented lines

* Update docker-scanner.yaml to 1.2.8

---------

Co-authored-by: Vishwajit Nagulkar <[email protected]>
  • Loading branch information
Bharadwajshivam28 and VishwajitNagulkar authored Sep 4, 2024
1 parent 030f5f5 commit 404bd81
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ RUN apt install -y \


# ZSH
ADD ./etc/install-zsh.sh /root/install-zsh.sh
ADD ./etc/install-zsh.sh /home/ubuntu/install-zsh.sh
ADD .docker/etc/install-zsh.sh /root/install-zsh.sh
ADD .docker/etc/install-zsh.sh /home/ubuntu/install-zsh.sh

RUN chmod +x /root/install-zsh.sh
RUN chmod +x /home/ubuntu/install-zsh.sh
Expand Down Expand Up @@ -183,4 +183,4 @@ WORKDIR /home/ubuntu/workspace

# Define default command.
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
CMD ["/usr/sbin/sshd", "-D"]
4 changes: 2 additions & 2 deletions .github/workflows/docker-scanner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ on:

jobs:
docker-scanner:
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected].7
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected].8
with:
severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL"
dockerfile-path: "./.docker/Dockerfile"
security-upload: "true"
security-upload: "true"
45 changes: 45 additions & 0 deletions .github/workflows/enigma-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Enigma Docker Build and Publish.
on:
push:
tags: [ v* ]

jobs:
docker-build-publish:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
env:
DOCKER_IMAGE: devops-machine
DOCKER_TAG: ghcr.io/${{ github.repository }}:${{ github.ref_name }}
PROVIDER: github

steps:
- name: Checkout code
uses: actions/[email protected]

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Docker Image
uses: clouddrove/[email protected]
with:
command: bake
DOCKER_IMAGE: ${{ env.DOCKER_IMAGE }}
DOCKER_TAG: ${{ env.DOCKER_TAG }}
DOCKERFILE_PATH: .docker/Dockerfile
GITHUB_USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB }}

- name: Publish Docker Image
uses: clouddrove/[email protected]
with:
command: publish
DOCKER_IMAGE: ${{ env.DOCKER_IMAGE }}
DOCKER_TAG: ${{ env.DOCKER_TAG }}
DOCKERFILE_PATH: .docker/Dockerfile
GITHUB_USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB }}
4 changes: 2 additions & 2 deletions .github/workflows/sanity-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
uses: docker/[email protected]

- name: Build the application image
run: docker build -t clouddrove/devops:0.0.${{ github.run_number }} ./.docker/.

run: docker build -t clouddrove/devops:0.0.${{ github.run_number }} -f .docker/Dockerfile .
- name: Bring container up and running
run: docker run --name devops -d clouddrove/devops:0.0.${{ github.run_number }}

Expand Down

0 comments on commit 404bd81

Please sign in to comment.