Skip to content

Commit

Permalink
Merge pull request #16 from PerfectThymeTech/marvinbuss/build_image
Browse files Browse the repository at this point in the history
Add Custom Image
  • Loading branch information
marvinbuss committed Dec 10, 2023
2 parents eccb512 + a67a9a2 commit 69ffd5c
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Container
on:
push:
branches:
- main
paths:
- "code/container/**"

pull_request:
branches:
- main
paths:
- "code/container/**"

jobs:
build_and_publish:
uses: ./.github/workflows/_containerTemplate.yml
name: "Build & Publish"
with:
environment: "dev"
working_directory: "./code/container"
registry_uri: "ghcr.io"
image_namespace_name: "PerfectThymeTech"
image_name: "GitHubAgentAzure"
secrets:
USER_NAME: ${{ github.actor }}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions code/container/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM myoung34/github-runner:2.311.0-ubuntu-focal

# General
RUN sudo apt-get update

# Install Azure CLI
ARG AZURE_CLI_VERSION=2.55.0
RUN sudo apt-get install -y ca-certificates curl apt-transport-https lsb-release gnupg \
&& sudo mkdir -p /etc/apt/keyrings \
&& curl -sLS https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null \
&& sudo chmod go+r /etc/apt/keyrings/microsoft.gpg \
&& AZ_DIST=$(lsb_release -cs) \
&& echo "deb [arch=`dpkg --print-architecture` signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/azure-cli/ $AZ_DIST main" | sudo tee /etc/apt/sources.list.d/azure-cli.list \
&& sudo apt-get update \
&& AZ_DIST=$(lsb_release -cs) \
&& sudo apt-get install -y azure-cli=$AZURE_CLI_VERSION-1~$AZ_DIST

# Install pwsh
ARG PWSH_VERSION=7.4.0
RUN sudo apt-get install -y wget \
&& wget https://github.com/PowerShell/PowerShell/releases/download/v$PWSH_VERSION/powershell_$PWSH_VERSION-1.deb_amd64.deb \
&& sudo dpkg -i powershell_$PWSH_VERSION-1.deb_amd64.deb \
&& sudo apt-get install -fy \
&& rm powershell_$PWSH_VERSION-1.deb_amd64.deb \
&& pwsh -Command "Install-Module -Name Az -Repository PSGallery -Force"

0 comments on commit 69ffd5c

Please sign in to comment.