Skip to content

Commit

Permalink
feat(arc-container): build just the arc container (#206)
Browse files Browse the repository at this point in the history
chore(arc-container): build just the arc container
  • Loading branch information
JossWhittle authored Dec 10, 2024
1 parent 82ae1a3 commit 1e4f51e
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/commitlint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export default {
'commitlint',
'labeler',
'renovate',
'sonar-dotnet'
'sonar-dotnet',
'arc-container'
]]
}
};
45 changes: 45 additions & 0 deletions .github/workflows/actions-runner-container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build Actions Runner Container

on:
pull_request:
paths:
- '.github/workflows/actions-runner-container.yaml'
- 'containers/actions-runner/**'
push:
branches:
- 'main'
paths:
- '.github/workflows/actions-runner-container.yaml'
- 'containers/actions-runner/**'

permissions:
contents: write
pull-requests: write
actions: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Cancel early on pull requests if new commits are added,
# Don't cancel on release pushes
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
# Job name must be unique across repo to target
# branch protection rules "required checks" properly!
actions-runner-container:
uses: SwanseaUniversityMedical/workflows/.github/workflows/pr-and-release-container.yaml@feat/runs-on-input
with:
job-name: actions-runner-container
comment-pr: "true"
comment-release: "true"
registry: ${{ vars.HARBOR_REGISTRY }}
registry-user: ${{ vars.HARBOR_USER }}
registry-repo: ${{ vars.HARBOR_PROJECT }}/actions-runner
release-tag-format: 'v${version}-actions-runner-container'
cosign-public-key: ${{ vars.COSIGN_PUBLIC_KEY }}
build-file: containers/actions-runner/Dockerfile
build-context: containers/actions-runner
secrets:
cosign-private-key: ${{ secrets.COSIGN_PRIVATE_KEY }}
cosign-password: ${{ secrets.COSIGN_PASSWORD }}
registry-token: ${{ secrets.HARBOR_TOKEN }}
18 changes: 18 additions & 0 deletions containers/actions-runner/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ghcr.io/actions/actions-runner:2.318.0

LABEL org.opencontainers.image.source=https://github.com/SwanseaUniversityMedical/workflows

# Add missing dependencies compared to the old summerwind runners
USER root
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
curl unzip jq wget python3-pip git-all && \
rm -rf /var/lib/apt/lists/*

RUN echo 'export PATH="/home/runner/.local/bin:$PATH"' >> /etc/profile
ENV PATH="/home/runner/.local/bin:$PATH"

USER runner
ENV PATH="/home/runner/.local/bin:$PATH"

0 comments on commit 1e4f51e

Please sign in to comment.