Skip to content

Commit

Permalink
Merge pull request #215 from StartAutomating/EZ-Docker
Browse files Browse the repository at this point in the history
EZOut 2.0.6
  • Loading branch information
StartAutomating authored Apr 16, 2024
2 parents 9f4c082 + acb6481 commit de5f23a
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 19 deletions.
45 changes: 41 additions & 4 deletions .github/workflows/TestReleaseAndPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -600,12 +600,49 @@ jobs:
id: EZOutBranch
- name: UseHelpOut
uses: StartAutomating/HelpOut@master
- name: GitLogger
uses: GitLogging/GitLoggerAction@main
id: GitLogger
- name: PSA
uses: StartAutomating/PSA@main
id: PSA
- name: GitLogger
uses: GitLogging/GitLoggerAction@main
id: GitLogger
- name: Log in to ghcr.io
uses: docker/login-action@master
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker Metadata (for branch)
if: ${{github.ref_name != 'main' && github.ref_name != 'master' && github.ref_name != 'latest'}}
id: meta
uses: docker/metadata-action@master
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Extract Docker Metadata (for main)
if: ${{github.ref_name == 'main' || github.ref_name == 'master' || github.ref_name == 'latest'}}
id: metaMain
uses: docker/metadata-action@master
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: latest=true
- name: Build and push Docker image (from main)
if: ${{github.ref_name == 'main' || github.ref_name == 'master' || github.ref_name == 'latest'}}
uses: docker/build-push-action@master
with:
context: .
push: true
tags: ${{ steps.metaMain.outputs.tags }}
labels: ${{ steps.metaMain.outputs.labels }}
- name: Build and push Docker image (from branch)
if: ${{github.ref_name != 'main' && github.ref_name != 'master' && github.ref_name != 'latest'}}
uses: docker/build-push-action@master
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
env:
AT_PROTOCOL_APP_PASSWORD: ${{ secrets.AT_PROTOCOL_APP_PASSWORD }}
AT_PROTOCOL_HANDLE: mrpowershell.bsky.social
AT_PROTOCOL_APP_PASSWORD: ${{ secrets.AT_PROTOCOL_APP_PASSWORD }}
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
12 changes: 8 additions & 4 deletions Build/EZOut.GitHubWorkflow.PSDevOps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,25 @@ New-GitHubWorkflow -Name "Test, Tag, Release, and Publish" -On Demand, Push -Job
TagReleaseAndPublish,
BuildEZOut -OutputPath (
Join-Path $pwd .\.github\workflows\TestReleaseAndPublish.yml
) -Env @{
) -Env ([Ordered]@{
"AT_PROTOCOL_HANDLE" = "mrpowershell.bsky.social"
"AT_PROTOCOL_APP_PASSWORD" = '${{ secrets.AT_PROTOCOL_APP_PASSWORD }}'
}
REGISTRY = 'ghcr.io'
IMAGE_NAME = '${{ github.repository }}'
})

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

New-GitHubWorkflow -On Demand -Name 'show-demo-psa' -Job SendPSA -OutputPath (
Join-Path $pwd .\.github\workflows\SendPSA.yml
) -Env @{
) -Env ([Ordered]@{
"AT_PROTOCOL_HANDLE" = "mrpowershell.bsky.social"
"AT_PROTOCOL_APP_PASSWORD" = '${{ secrets.AT_PROTOCOL_APP_PASSWORD }}'
}
REGISTRY = 'ghcr.io'
IMAGE_NAME = '${{ github.repository }}'
})


Pop-Location
58 changes: 54 additions & 4 deletions Build/GitHub/Jobs/BuildEZOut.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,66 @@
uses = './'
id = 'EZOutBranch'
},
'RunHelpOut',
'RunHelpOut',
@{
name = 'PSA'
uses = 'StartAutomating/PSA@main'
id = 'PSA'
},
@{
name = 'GitLogger'
uses = 'GitLogging/GitLoggerAction@main'
id = 'GitLogger'
},
@{
name = 'PSA'
uses = 'StartAutomating/PSA@main'
id = 'PSA'
'name'='Log in to ghcr.io'
'uses'='docker/login-action@master'
'with'=@{
'registry'='${{ env.REGISTRY }}'
'username'='${{ github.actor }}'
'password'='${{ secrets.GITHUB_TOKEN }}'
}
},
@{
name = 'Extract Docker Metadata (for branch)'
if = '${{github.ref_name != ''main'' && github.ref_name != ''master'' && github.ref_name != ''latest''}}'
id = 'meta'
uses = 'docker/metadata-action@master'
with = @{
'images'='${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}'
}
},
@{
name = 'Extract Docker Metadata (for main)'
if = '${{github.ref_name == ''main'' || github.ref_name == ''master'' || github.ref_name == ''latest''}}'
id = 'metaMain'
uses = 'docker/metadata-action@master'
with = @{
'images'='${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}'
'flavor'='latest=true'
}
},
@{
name = 'Build and push Docker image (from main)'
if = '${{github.ref_name == ''main'' || github.ref_name == ''master'' || github.ref_name == ''latest''}}'
uses = 'docker/build-push-action@master'
with = @{
'context'='.'
'push'='true'
'tags'='${{ steps.metaMain.outputs.tags }}'
'labels'='${{ steps.metaMain.outputs.labels }}'
}
},
@{
name = 'Build and push Docker image (from branch)'
if = '${{github.ref_name != ''main'' && github.ref_name != ''master'' && github.ref_name != ''latest''}}'
uses = 'docker/build-push-action@master'
with = @{
'context'='.'
'push'='true'
'tags'='${{ steps.meta.outputs.tags }}'
'labels'='${{ steps.meta.outputs.labels }}'
}
}
)
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## EZOut 2.0.6:

* EZOut Docker Support (#212, #213, #214)

---

## EZOut 2.0.5:

* Improving Strict mode Tolerance (#210)
* Removing Mount error on multiple imports (#209)

---

## EZOut 2.0.4:

* Write-FormatViewExpression/Write-FormatCustomView now support -Frame, -LeftIndent, -RightIndent, -FirstLineHanging, -FirstLineIndent ( Fixes #164 )
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM mcr.microsoft.com/powershell
ARG ModuleName=EZOut
COPY . ./usr/local/share/powershell/Modules/$ModuleName
RUN pwsh -c "New-Item -Path /root/.config/powershell/Microsoft.PowerShell_profile.ps1 -Value 'Import-Module $ModuleName' -Force"
2 changes: 1 addition & 1 deletion EZOut.format.ps1xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Generated with EZOut 2.0.5: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
<!-- Generated with EZOut 2.0.6: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
<Configuration>
<ViewDefinitions>
<View>
Expand Down
10 changes: 5 additions & 5 deletions EZOut.psd1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@{

Check warning on line 1 in EZOut.psd1

View workflow job for this annotation

GitHub Actions / PowerShellStaticAnalysis

PSAvoidUsingDeprecatedManifestFields : The module manifest member 'ModuleToProcess' has been deprecated. Use the 'RootModule' member instead.
ModuleToProcess = 'EZOut.psm1'
ModuleVersion = '2.0.5'
ModuleVersion = '2.0.6'
GUID = 'cef786f0-8a0b-4a5d-a2c6-b433095354cd'
Author = 'James Brundage'
CompanyName = 'Start-Automating'
Expand Down Expand Up @@ -69,16 +69,16 @@

Tags = '.ps1xml', 'Format','Output','Types', 'Colorized'
ReleaseNotes = @'
## EZOut 2.0.5:
## EZOut 2.0.6:
* Improving Strict mode Tolerance (#210)
* Removing Mount error on multiple imports (#209)
* EZOut Docker Support (#212, #213, #214)
---
Additional Release History found in [CHANGELOG](https://github.com/StartAutomating/EZOut/blob/master/CHANGELOG.md)
Like It? [Star It!](https://github.com/StartAutomating/EZOut) Love It? [Support It!](https://github.com/sponsors/StartAutomating)
> Like It? [Star It!](https://github.com/StartAutomating/EZOut)
> Love It? [Support It!](https://github.com/sponsors/StartAutomating)
'@

Expand Down
2 changes: 1 addition & 1 deletion EZOut.types.ps1xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Generated with EZOut 2.0.5: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
<!-- Generated with EZOut 2.0.6: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
<Types>
<Type>
<Name>EZOut.Invisible</Name>
Expand Down

0 comments on commit de5f23a

Please sign in to comment.