Run Docker - Ubuntu #26
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: 'Run Docker - Ubuntu' | |
# Allow run manually | |
on: | |
schedule: | |
- cron: '0 0 1 * *' # This will run at 00:00 on the 1st of every month | |
workflow_dispatch: | |
inputs: | |
working_directory: | |
type: string | |
description: What working directory should be passed to the script | |
default: "containers/ubuntu" | |
docker_image_name: | |
type: string | |
description: 'Docker Image name?' | |
default: "azdo-agent-containers/ubuntu" | |
enable_debug_mode: | |
type: boolean | |
description: 'Whether debug mode should be enable for within the script' | |
default: true | |
registry_url: | |
type: string | |
description: 'The URL of the container registry' | |
default: ghcr.io | |
docker_file_name: | |
type: string | |
description: 'Docker file name?' | |
default: "Dockerfile" | |
push_docker_image: | |
type: boolean | |
description: 'Push docker image?' | |
default: true | |
jobs: | |
run-script: | |
name: 'Run Script' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: pwsh | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
id: run-script | |
shell: pwsh | |
run: | | |
$workingDirectory = Join-Path -Path "${{ github.workspace }}" -ChildPath "${{ inputs.working_directory }}" | |
.\Run-Docker.ps1 ` | |
-WorkingDirectory $workingDirectory ` | |
-PushDockerImage ${{ inputs.push_docker_image }} ` | |
-DebugMode ${{ inputs.enable_debug_mode }} ` | |
-DockerImageName ${{ inputs.docker_image_name }} ` | |
-DockerFileName ${{ inputs.docker_file_name }} ` | |
-RegistryUsername ${{ secrets.RegistryUsername }} ` | |
-RegistryPassword ${{ secrets.RegistryPassword }} ` | |
-ImageOrg ${{ github.repository_owner }} |