Skip to content

Commit da98c3e

Browse files
committed
update rhel
1 parent 54dcc5a commit da98c3e

File tree

2 files changed

+87
-2
lines changed

2 files changed

+87
-2
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: 'Run Docker - Debian'
2+
3+
# Allow run manually
4+
on:
5+
schedule:
6+
- cron: '0 0 1 * *' # This will run at 00:00 on the 1st of every month
7+
workflow_dispatch:
8+
inputs:
9+
working_directory:
10+
type: string
11+
description: What working directory should be passed to the script
12+
default: "containers/debian"
13+
build_context:
14+
type: string
15+
description: "The context of the build"
16+
default: "github_workspace"
17+
docker_image_name:
18+
type: string
19+
description: 'Docker Image name?'
20+
default: "terraform-azure-azdo-pipeline-templates/ubuntu"
21+
enable_debug_mode:
22+
type: boolean
23+
description: 'Whether debug mode should be enable for within the script'
24+
default: true
25+
registry_url:
26+
type: string
27+
description: 'The URL of the container registry'
28+
default: ghcr.io
29+
docker_file_name:
30+
type: string
31+
description: 'Docker file name?'
32+
default: "Dockerfile"
33+
push_docker_image:
34+
type: string
35+
description: 'Push docker image?'
36+
default: 'true'
37+
38+
jobs:
39+
run-script:
40+
name: 'Run Script'
41+
runs-on: ubuntu-latest
42+
43+
defaults:
44+
run:
45+
shell: pwsh
46+
47+
steps:
48+
- uses: actions/checkout@v3
49+
50+
- name: Build
51+
id: run-script
52+
shell: pwsh
53+
run: |
54+
if ("${{ inputs.working_directory }}" -eq "github_workspace")
55+
{
56+
$workingDirectory = "${{ github.workspace }}"
57+
}
58+
else
59+
{
60+
$workingDirectory = "${{ inputs.working_directory }}"
61+
}
62+
63+
.\Run-Docker.ps1 `
64+
-WorkingDirectory $workingDirectory `
65+
-BuildContext ${{ github.workspace }} `
66+
-PushDockerImage ${{ inputs.push_docker_image }} `
67+
-DebugMode ${{ inputs.enable_debug_mode }} `
68+
-DockerImageName ${{ inputs.docker_image_name }} `
69+
-DockerFileName ${{ inputs.docker_file_name }} `
70+
-RegistryUsername ${{ secrets.RegistryUsername }} `
71+
-RegistryPassword ${{ secrets.RegistryPassword }} `
72+
-ImageOrg ${{ github.repository_owner }}

.github/workflows/build-rhel-base-docker.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ on:
1010
type: string
1111
description: What working directory should be passed to the script
1212
default: "containers/rhel"
13+
build_context:
14+
type: string
15+
description: "The context of the build"
16+
default: "github_workspace"
1317
docker_image_name:
1418
type: string
1519
description: 'Docker Image name?'
16-
default: "terraform-azure-azdo-pipeline-templates/rhel"
20+
default: "terraform-azure-azdo-pipeline-templates/ubuntu"
1721
enable_debug_mode:
1822
type: boolean
1923
description: 'Whether debug mode should be enable for within the script'
@@ -47,9 +51,18 @@ jobs:
4751
id: run-script
4852
shell: pwsh
4953
run: |
50-
$workingDirectory = Join-Path -Path "${{ github.workspace }}" -ChildPath "${{ inputs.working_directory }}"
54+
if ("${{ inputs.working_directory }}" -eq "github_workspace")
55+
{
56+
$workingDirectory = "${{ github.workspace }}"
57+
}
58+
else
59+
{
60+
$workingDirectory = "${{ inputs.working_directory }}"
61+
}
62+
5163
.\Run-Docker.ps1 `
5264
-WorkingDirectory $workingDirectory `
65+
-BuildContext ${{ github.workspace }} `
5366
-PushDockerImage ${{ inputs.push_docker_image }} `
5467
-DebugMode ${{ inputs.enable_debug_mode }} `
5568
-DockerImageName ${{ inputs.docker_image_name }} `

0 commit comments

Comments
 (0)