Skip to content

Commit

Permalink
Publish for all platforms
Browse files Browse the repository at this point in the history
Pull Request: #9 (main)
  • Loading branch information
dimikot committed Mar 2, 2024
1 parent 2546714 commit c4399c0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Kill self-hosted runner container
run: kill -SIGINT $(cat ~user/entrypoint.pid)

# Publishes host image to Docker Hub.
# Publishes "host" to Docker Hub.
push-host:
runs-on: ubuntu-latest
needs:
Expand All @@ -87,6 +87,8 @@ jobs:
- spawn-job-test
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/metadata-action@v5
id: meta
with:
Expand All @@ -99,11 +101,18 @@ jobs:
- uses: docker/build-push-action@v5
with:
context: docker/host
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- uses: peter-evans/dockerhub-description@v3
with:
username: dimikot
password: ${{ secrets.DOCKERHUB_PAT }}
readme-filepath: docker/host/README.md
repository: dimikot/ci-storage-host

# Publishes self-hosted-runner image to Docker Hub.
# Publishes "self-hosted-runner" to Docker Hub.
push-self-hosted-runner:
runs-on: ubuntu-latest
needs:
Expand All @@ -112,6 +121,8 @@ jobs:
- spawn-job-test
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/metadata-action@v5
id: meta
with:
Expand All @@ -124,6 +135,13 @@ jobs:
- uses: docker/build-push-action@v5
with:
context: docker/self-hosted-runner
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- uses: peter-evans/dockerhub-description@v3
with:
username: dimikot
password: ${{ secrets.DOCKERHUB_PAT }}
readme-filepath: docker/self-hosted-runner/README.md
repository: dimikot/ci-storage-self-hosted-runner
2 changes: 2 additions & 0 deletions docker/host/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ Build an image from this Dockerfile to launch a simple SSH server with rsync.

One "host" container may serve multiple GitHub repositories. Each of them will
have own directory in /home/user/ci-storage (managed by ci-storage tool).

See also https://github.com/dimikot/ci-storage
2 changes: 2 additions & 0 deletions docker/self-hosted-runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ self-hosted runners as you want. An example scenario:
The container in this Dockerfile is serves only one particular GitHub repository
(controlled by GH_REPOSITORY environment variable at boot time). To serve
different repositories, boot different containers.

See also https://github.com/dimikot/ci-storage

0 comments on commit c4399c0

Please sign in to comment.