Skip to content

Commit

Permalink
feat: PSDevOps Container Build workflow ( Fixes #202 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Sep 15, 2024
1 parent 0ded3f0 commit 034d064
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/TestAndPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,46 @@ jobs:
uses: StartAutomating/EZOut@master
- name: UseHelpOut
uses: StartAutomating/HelpOut@master
- name: Log in to ghcr.io
uses: docker/login-action@master
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
env:
REGISTRY: ghcr.io
- 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 }}
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
- 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:
NoCoverage: true
SYSTEM_ACCESSTOKEN: ${{ secrets.AZUREDEVOPSPAT }}
3 changes: 2 additions & 1 deletion GitHub/Jobs/BuildPSDevOps.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
'RunPSSVG',
'RunPipeScript',
'RunEZOut',
'RunHelpOut'
'RunHelpOut',
'BuildAndPublishContainer'
)
}

0 comments on commit 034d064

Please sign in to comment.