Merge pull request #155 from brandonmcclure/dependabot/github_actions… #92
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: Package Modules | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main # Trigger CI on main branch | |
paths: | |
- 'Modules/**' | |
- '.github/workflows/package-module.yml' | |
pull_request: | |
branches: | |
- main # Trigger gated pipeline on PR to main | |
paths: | |
- 'Modules/**' | |
- '.github/workflows/package-module.yml' | |
jobs: | |
package_powershell: | |
runs-on: ubuntu-20.04 | |
# if: github.ref == 'refs/heads/main' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
# - uses: addnab/docker-run-action@v3 | |
# with: | |
# username: bmcclure89 | |
# password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# image: bmcclure89/fc_pwsh_build:main | |
# options: -v ${{ github.workspace }}:/build | |
# run: | | |
# -pathToSearch '/build' | |
- uses: addnab/docker-run-action@v3 | |
with: | |
username: bmcclure89 | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
image: bmcclure89/fc_pwsh_test:main | |
shell: pwsh | |
options: -v ${{ github.workspace }}:/tests | |
run: | | |
Invoke-Pester -ErrorAction Stop -ci; | |
- name: Artifact prep - all | |
run: | | |
sudo cp -r Modules/ bin/ | |
- name: Archive production artifacts - all | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Powershell All | |
path: | | |
bin | |
- name: Publish FC_Core | |
if: github.ref == 'refs/heads/main' | |
continue-on-error: true | |
uses: natescherer/publish-powershell-action@v1 | |
with: | |
token: ${{ secrets.GALLERY_API_KEY }} | |
target: gallery | |
path: bin/FC_Core | |
- name: Publish FC_Core | |
if: github.ref == 'refs/heads/main' | |
continue-on-error: true | |
uses: natescherer/publish-powershell-action@v1 | |
with: | |
token: ${{ secrets.GALLERY_API_KEY }} | |
target: gallery | |
path: bin/FC_Data | |
- name: Publish FC_Core | |
if: github.ref == 'refs/heads/main' | |
continue-on-error: true | |
uses: natescherer/publish-powershell-action@v1 | |
with: | |
token: ${{ secrets.GALLERY_API_KEY }} | |
target: gallery | |
path: bin/FC_Docker | |
- name: Publish FC_Core | |
if: github.ref == 'refs/heads/main' | |
continue-on-error: true | |
uses: natescherer/publish-powershell-action@v1 | |
with: | |
token: ${{ secrets.GALLERY_API_KEY }} | |
target: gallery | |
path: bin/FC_Git | |
- name: Publish FC_Core | |
if: github.ref == 'refs/heads/main' | |
continue-on-error: true | |
uses: natescherer/publish-powershell-action@v1 | |
with: | |
token: ${{ secrets.GALLERY_API_KEY }} | |
target: gallery | |
path: bin/FC_Log | |
- name: Publish FC_Core | |
if: github.ref == 'refs/heads/main' | |
continue-on-error: true | |
uses: natescherer/publish-powershell-action@v1 | |
with: | |
token: ${{ secrets.GALLERY_API_KEY }} | |
target: gallery | |
path: bin/FC_MicrosoftGraph | |
- name: Publish FC_Core | |
if: github.ref == 'refs/heads/main' | |
continue-on-error: true | |
uses: natescherer/publish-powershell-action@v1 | |
with: | |
token: ${{ secrets.GALLERY_API_KEY }} | |
target: gallery | |
path: bin/FC_Misc | |
- name: Publish FC_Core | |
if: github.ref == 'refs/heads/main' | |
continue-on-error: true | |
uses: natescherer/publish-powershell-action@v1 | |
with: | |
token: ${{ secrets.GALLERY_API_KEY }} | |
target: gallery | |
path: bin/FC_SysAdmin | |
- name: Publish FC_Core | |
if: github.ref == 'refs/heads/main' | |
continue-on-error: true | |
uses: natescherer/publish-powershell-action@v1 | |
with: | |
token: ${{ secrets.GALLERY_API_KEY }} | |
target: gallery | |
path: bin/FC_TFS |