Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/_containerTemplate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Install cosign
id: install_cosign
uses: sigstore/cosign-installer@v3.7.0
if: github.event_name != 'pull_request'
# if: github.event_name != 'pull_request'
with:
cosign-release: 'v2.2.0'

Expand All @@ -74,7 +74,7 @@ jobs:
- name: Login Container Registry
id: registry_login
uses: docker/login-action@v3.3.0
if: github.event_name != 'pull_request'
# if: github.event_name != 'pull_request'
with:
registry: ${{ inputs.registry_uri }}
username: ${{ secrets.USER_NAME }}
Expand All @@ -101,7 +101,8 @@ jobs:
with:
context: ${{ inputs.working_directory }}
file: ${{ inputs.working_directory }}/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
# push: ${{ github.event_name != 'pull_request' }}
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
cache-from: type=gha
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
lint:
name: Lint and Test
runs-on: [ubuntu-latest]
runs-on: [self-hosted]
continue-on-error: false

steps:
Expand All @@ -21,12 +21,19 @@ jobs:
with:
python-version: "3.11"

# Setup Node
- name: Setup Node
id: node_setup
uses: actions/setup-node@v4
with:
node-version: 20

# Setup Terraform
- name: Setup Terraform
id: terraform_setup
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.9.6"
terraform_version: "1.10.4"
terraform_wrapper: true

# Checkout repository
Expand Down
17 changes: 11 additions & 6 deletions code/container/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
FROM myoung34/github-runner-base:ubuntu-focal
FROM ghcr.io/actions/actions-runner:2.322.0
LABEL maintainer="info@perfectthymetech.com"

USER root

ENV AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
RUN mkdir -p /opt/hostedtoolcache
RUN mkdir -p /_work

ARG GH_RUNNER_VERSION="2.322.0"
ARG AZURE_CLI_VERSION="2.68.0"
ARG PWSH_VERSION="7.5.0"
ARG TARGETPLATFORM

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

WORKDIR /actions-runner
COPY install_actions.sh install_dependencies.sh /actions-runner/
COPY install_dependencies.sh /actions-runner/

RUN chmod +x /actions-runner/install_actions.sh /actions-runner/install_dependencies.sh \
&& /actions-runner/install_actions.sh ${GH_RUNNER_VERSION} ${TARGETPLATFORM} \
RUN apt-get update \
&& apt-get install -y curl jq \
&& chmod +x /actions-runner/install_dependencies.sh \
&& apt-get clean \
&& /actions-runner/install_dependencies.sh ${AZURE_CLI_VERSION} ${PWSH_VERSION} \
&& rm /actions-runner/install_actions.sh \
&& rm /actions-runner/install_dependencies.sh \
&& chown runner /_work /actions-runner /opt/hostedtoolcache

COPY token.sh entrypoint.sh app_token.sh /
RUN chmod +x /token.sh /entrypoint.sh /app_token.sh

USER runner

ENTRYPOINT ["/entrypoint.sh"]
CMD ["./bin/Runner.Listener", "run", "--startuptype", "service"]
13 changes: 0 additions & 13 deletions code/container/install_actions.sh

This file was deleted.

21 changes: 11 additions & 10 deletions code/container/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@ AZURE_CLI_VERSION=$1
PWSH_VERSION=$2

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

# Install Powershell
sudo apt-get install -y wget \
apt-get update \
&& 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 \
&& dpkg -i powershell_$PWSH_VERSION-1.deb_amd64.deb \
&& apt-get install -fy \
&& rm powershell_$PWSH_VERSION-1.deb_amd64.deb \
&& pwsh -Command "Install-Module -Name Az -Repository PSGallery -Force"
Loading