Skip to content

Commit de5f23a

Browse files
Merge pull request #215 from StartAutomating/EZ-Docker
EZOut 2.0.6
2 parents 9f4c082 + acb6481 commit de5f23a

8 files changed

+127
-19
lines changed

.github/workflows/TestReleaseAndPublish.yml

+41-4
Original file line numberDiff line numberDiff line change
@@ -600,12 +600,49 @@ jobs:
600600
id: EZOutBranch
601601
- name: UseHelpOut
602602
uses: StartAutomating/HelpOut@master
603-
- name: GitLogger
604-
uses: GitLogging/GitLoggerAction@main
605-
id: GitLogger
606603
- name: PSA
607604
uses: StartAutomating/PSA@main
608605
id: PSA
606+
- name: GitLogger
607+
uses: GitLogging/GitLoggerAction@main
608+
id: GitLogger
609+
- name: Log in to ghcr.io
610+
uses: docker/login-action@master
611+
with:
612+
registry: ${{ env.REGISTRY }}
613+
username: ${{ github.actor }}
614+
password: ${{ secrets.GITHUB_TOKEN }}
615+
- name: Extract Docker Metadata (for branch)
616+
if: ${{github.ref_name != 'main' && github.ref_name != 'master' && github.ref_name != 'latest'}}
617+
id: meta
618+
uses: docker/metadata-action@master
619+
with:
620+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
621+
- name: Extract Docker Metadata (for main)
622+
if: ${{github.ref_name == 'main' || github.ref_name == 'master' || github.ref_name == 'latest'}}
623+
id: metaMain
624+
uses: docker/metadata-action@master
625+
with:
626+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
627+
flavor: latest=true
628+
- name: Build and push Docker image (from main)
629+
if: ${{github.ref_name == 'main' || github.ref_name == 'master' || github.ref_name == 'latest'}}
630+
uses: docker/build-push-action@master
631+
with:
632+
context: .
633+
push: true
634+
tags: ${{ steps.metaMain.outputs.tags }}
635+
labels: ${{ steps.metaMain.outputs.labels }}
636+
- name: Build and push Docker image (from branch)
637+
if: ${{github.ref_name != 'main' && github.ref_name != 'master' && github.ref_name != 'latest'}}
638+
uses: docker/build-push-action@master
639+
with:
640+
context: .
641+
push: true
642+
tags: ${{ steps.meta.outputs.tags }}
643+
labels: ${{ steps.meta.outputs.labels }}
609644
env:
610-
AT_PROTOCOL_APP_PASSWORD: ${{ secrets.AT_PROTOCOL_APP_PASSWORD }}
611645
AT_PROTOCOL_HANDLE: mrpowershell.bsky.social
646+
AT_PROTOCOL_APP_PASSWORD: ${{ secrets.AT_PROTOCOL_APP_PASSWORD }}
647+
REGISTRY: ghcr.io
648+
IMAGE_NAME: ${{ github.repository }}

Build/EZOut.GitHubWorkflow.PSDevOps.ps1

+8-4
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,25 @@ New-GitHubWorkflow -Name "Test, Tag, Release, and Publish" -On Demand, Push -Job
1111
TagReleaseAndPublish,
1212
BuildEZOut -OutputPath (
1313
Join-Path $pwd .\.github\workflows\TestReleaseAndPublish.yml
14-
) -Env @{
14+
) -Env ([Ordered]@{
1515
"AT_PROTOCOL_HANDLE" = "mrpowershell.bsky.social"
1616
"AT_PROTOCOL_APP_PASSWORD" = '${{ secrets.AT_PROTOCOL_APP_PASSWORD }}'
17-
}
17+
REGISTRY = 'ghcr.io'
18+
IMAGE_NAME = '${{ github.repository }}'
19+
})
1820

1921
New-GitHubWorkflow -On Demand -Job RunGitPub -Name OnIssueChanged -OutputPath (
2022
Join-Path $pwd .github\workflows\GitPub.yml
2123
)
2224

2325
New-GitHubWorkflow -On Demand -Name 'show-demo-psa' -Job SendPSA -OutputPath (
2426
Join-Path $pwd .\.github\workflows\SendPSA.yml
25-
) -Env @{
27+
) -Env ([Ordered]@{
2628
"AT_PROTOCOL_HANDLE" = "mrpowershell.bsky.social"
2729
"AT_PROTOCOL_APP_PASSWORD" = '${{ secrets.AT_PROTOCOL_APP_PASSWORD }}'
28-
}
30+
REGISTRY = 'ghcr.io'
31+
IMAGE_NAME = '${{ github.repository }}'
32+
})
2933

3034

3135
Pop-Location

Build/GitHub/Jobs/BuildEZOut.psd1

+54-4
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,66 @@
4141
uses = './'
4242
id = 'EZOutBranch'
4343
},
44-
'RunHelpOut',
44+
'RunHelpOut',
45+
@{
46+
name = 'PSA'
47+
uses = 'StartAutomating/PSA@main'
48+
id = 'PSA'
49+
},
4550
@{
4651
name = 'GitLogger'
4752
uses = 'GitLogging/GitLoggerAction@main'
4853
id = 'GitLogger'
4954
},
5055
@{
51-
name = 'PSA'
52-
uses = 'StartAutomating/PSA@main'
53-
id = 'PSA'
56+
'name'='Log in to ghcr.io'
57+
'uses'='docker/login-action@master'
58+
'with'=@{
59+
'registry'='${{ env.REGISTRY }}'
60+
'username'='${{ github.actor }}'
61+
'password'='${{ secrets.GITHUB_TOKEN }}'
62+
}
63+
},
64+
@{
65+
name = 'Extract Docker Metadata (for branch)'
66+
if = '${{github.ref_name != ''main'' && github.ref_name != ''master'' && github.ref_name != ''latest''}}'
67+
id = 'meta'
68+
uses = 'docker/metadata-action@master'
69+
with = @{
70+
'images'='${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}'
71+
}
72+
},
73+
@{
74+
name = 'Extract Docker Metadata (for main)'
75+
if = '${{github.ref_name == ''main'' || github.ref_name == ''master'' || github.ref_name == ''latest''}}'
76+
id = 'metaMain'
77+
uses = 'docker/metadata-action@master'
78+
with = @{
79+
'images'='${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}'
80+
'flavor'='latest=true'
81+
}
82+
},
83+
@{
84+
name = 'Build and push Docker image (from main)'
85+
if = '${{github.ref_name == ''main'' || github.ref_name == ''master'' || github.ref_name == ''latest''}}'
86+
uses = 'docker/build-push-action@master'
87+
with = @{
88+
'context'='.'
89+
'push'='true'
90+
'tags'='${{ steps.metaMain.outputs.tags }}'
91+
'labels'='${{ steps.metaMain.outputs.labels }}'
92+
}
93+
},
94+
@{
95+
name = 'Build and push Docker image (from branch)'
96+
if = '${{github.ref_name != ''main'' && github.ref_name != ''master'' && github.ref_name != ''latest''}}'
97+
uses = 'docker/build-push-action@master'
98+
with = @{
99+
'context'='.'
100+
'push'='true'
101+
'tags'='${{ steps.meta.outputs.tags }}'
102+
'labels'='${{ steps.meta.outputs.labels }}'
103+
}
54104
}
55105
)
56106
}

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
## EZOut 2.0.6:
2+
3+
* EZOut Docker Support (#212, #213, #214)
4+
5+
---
6+
7+
## EZOut 2.0.5:
8+
9+
* Improving Strict mode Tolerance (#210)
10+
* Removing Mount error on multiple imports (#209)
11+
12+
---
13+
114
## EZOut 2.0.4:
215

316
* Write-FormatViewExpression/Write-FormatCustomView now support -Frame, -LeftIndent, -RightIndent, -FirstLineHanging, -FirstLineIndent ( Fixes #164 )

Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM mcr.microsoft.com/powershell
2+
ARG ModuleName=EZOut
3+
COPY . ./usr/local/share/powershell/Modules/$ModuleName
4+
RUN pwsh -c "New-Item -Path /root/.config/powershell/Microsoft.PowerShell_profile.ps1 -Value 'Import-Module $ModuleName' -Force"

EZOut.format.ps1xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Generated with EZOut 2.0.5: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
1+
<!-- Generated with EZOut 2.0.6: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
22
<Configuration>
33
<ViewDefinitions>
44
<View>

EZOut.psd1

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@{
22
ModuleToProcess = 'EZOut.psm1'
3-
ModuleVersion = '2.0.5'
3+
ModuleVersion = '2.0.6'
44
GUID = 'cef786f0-8a0b-4a5d-a2c6-b433095354cd'
55
Author = 'James Brundage'
66
CompanyName = 'Start-Automating'
@@ -69,16 +69,16 @@
6969

7070
Tags = '.ps1xml', 'Format','Output','Types', 'Colorized'
7171
ReleaseNotes = @'
72-
## EZOut 2.0.5:
72+
## EZOut 2.0.6:
7373
74-
* Improving Strict mode Tolerance (#210)
75-
* Removing Mount error on multiple imports (#209)
74+
* EZOut Docker Support (#212, #213, #214)
7675
7776
---
7877
7978
Additional Release History found in [CHANGELOG](https://github.com/StartAutomating/EZOut/blob/master/CHANGELOG.md)
8079
81-
Like It? [Star It!](https://github.com/StartAutomating/EZOut) Love It? [Support It!](https://github.com/sponsors/StartAutomating)
80+
> Like It? [Star It!](https://github.com/StartAutomating/EZOut)
81+
> Love It? [Support It!](https://github.com/sponsors/StartAutomating)
8282
8383
'@
8484

EZOut.types.ps1xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Generated with EZOut 2.0.5: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
1+
<!-- Generated with EZOut 2.0.6: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
22
<Types>
33
<Type>
44
<Name>EZOut.Invisible</Name>

0 commit comments

Comments
 (0)