-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from chaddyc/feature/multi-build-containers
container configs and builds
- Loading branch information
Showing
6 changed files
with
112 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @chaddyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
target-branch: "main" | ||
schedule: | ||
interval: "monthly" | ||
groups: | ||
gha-dependabot: | ||
update-types: | ||
- "minor" | ||
- "patch" | ||
- "major" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
## Description | ||
Provide a brief summary of the changes in this PR, including the problem being solved or the feature being added. | ||
|
||
## Changes | ||
Select the type of change made in this PR: | ||
- [ ] New Feature 🚀 | ||
- [ ] Bug Fix 🐛 | ||
- [ ] Documentation Update 📝 | ||
- [ ] CI/CD Update ⚙️ | ||
|
||
## How to Test | ||
1. Describe the steps to test the changes. | ||
2. Include any special setup, commands, or test cases. | ||
|
||
## Checklist | ||
- [ ] Code has been linted and formatted. | ||
- [ ] Tests have been added or updated (if applicable). | ||
- [ ] Documentation has been updated (if needed). | ||
- [ ] The code follows the style and conventions of this repository. | ||
|
||
## Related Issues | ||
Fixes # (link the issue this PR addresses, if applicable). | ||
|
||
## Screenshots (if applicable) | ||
Add screenshots or screen recordings to demonstrate UI/UX changes. | ||
|
||
## Additional Notes | ||
Include any additional information or context here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Docker Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
docker-build: | ||
if: ${{ github.ref == 'refs/heads/main' && contains('["chaddyc"]', github.actor) }} | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
REPO: ${{ github.event.repository.name }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@4 | ||
|
||
- name: Set up QEM | ||
uses: docker/setup-qemu-action@3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push ubuntu latest | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
build-arg: UBUNTU_VERSION=latest | ||
push: true | ||
tags: chaddyc/${{ github.event.repository.name }}:latest | ||
|
||
- name: Build and push ubuntu 24.04 | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
build-arg: UBUNTU_VERSION=24.04 | ||
push: true | ||
tags: chaddyc/${{ github.event.repository.name }}:24.04 | ||
|
||
- name: Build and push ubuntu 22.04 | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
build-arg: UBUNTU_VERSION=22.04 | ||
push: true | ||
tags: chaddyc/${{ github.event.repository.name }}:22.04 | ||
|
||
|
||
|
||
# - name: Update docker readme description | ||
# uses: peter-evans/dockerhub-description@v3 | ||
# with: | ||
# username: ${{ secrets.DOCKER_USERNAME }} | ||
# password: ${{ secrets.DOCKER_PASSWORD }} | ||
# repository: chaddyc/${{ github.event.repository.name }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
FROM ubuntu:24.04 | ||
ARG UBUNTU_VERSION=20.04 | ||
FROM ubuntu:${UBUNTU_VERSION} | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,3 @@ | ||
# gha-runner-docker | ||
GitHub Actions Runner Docker Container | ||
# gha-runner | ||
|
||
docker run -e GITHUB_URL=https://github.com/<your-org-or-repo> \ | ||
-e RUNNER_TOKEN=<your-runner-token> \ | ||
--name <container-name> | ||
github-runner | ||
|
||
# GitHub Actions Runner with Docker | ||
|
||
This guide provides instructions for setting up a self-hosted GitHub Actions Runner using Docker. You can run the container with either `docker run` or `docker-compose`. | ||
|
||
--- | ||
|
||
## Prerequisites | ||
|
||
1. **Install Docker** | ||
Ensure Docker is installed and running on your system. Follow the [official installation guide](https://docs.docker.com/get-docker/) if needed. | ||
|
||
2. **Install Docker Compose (Optional)** | ||
If using `docker-compose`, ensure it is installed. You can follow the [official guide](https://docs.docker.com/compose/install/) to set it up. | ||
|
||
3. **Generate a Runner Token** | ||
- Go to your GitHub repository or organization. | ||
- Navigate to **Settings > Actions > Runners**. | ||
- Click **Add Runner** and copy the registration token provided. | ||
|
||
--- | ||
|
||
## Using `docker run` | ||
|
||
1. **Build the Docker Image** | ||
```bash | ||
docker build -t github-runner . |