Skip to content

Bmcclure/fc secret tests #80

Bmcclure/fc secret tests

Bmcclure/fc secret tests #80

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@v3
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@v3
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