JoeriHermans is building and distributing a new GitHub Actions Runner container. #15
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
name: Build & Distribute GitHub Actions Runner Container | |
run-name: ${{ github.actor }} is building and distributing a new GitHub Actions Runner container. | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- docker/Dockerfile | |
jobs: | |
package: | |
runs-on: ubuntu-latest # Run on GitHub infraastructure. | |
steps: | |
# Checkout the current Git repository. | |
- name: 'Git Checkout' | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# Authorize with the configured container registry hosting the OCI charts. | |
- name: 'Authorize with the container registry' | |
run: | | |
docker login harbor.peinser.com -u '${{ secrets.OCI_REGISTRY_LOGIN }}' -p '${{ secrets.OCI_REGISTRY_SECRET }}' | |
# Build the validation and production targets. | |
- name: 'Build & Push' | |
run: | | |
# Build the production version. | |
docker build --tag harbor.peinser.com/library/github-actions-runner:latest -f docker/Dockerfile . | |
# Push the image to the container registry. | |
docker push harbor.peinser.com/library/github-actions-runner:latest |