Tiny bugfixes #357
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: CI | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
if: github.repository == 'chris-peterson/pwsh-gitlab' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Publish PowerShell Module | |
uses: natescherer/publish-powershell-action@v1.1.1 | |
with: | |
token: ${{ secrets.PS_GALLERY_KEY }} | |
target: gallery | |
path: src/GitlabCli | |
environment: | |
name: PowerShell Gallery | |
url: https://www.powershellgallery.com/packages/GitlabCli | |
push: | |
if: github.repository == 'chris-peterson/pwsh-gitlab' | |
env: | |
IMAGE_NAME: gitlab-cli | |
IMAGE_VERSION: ${{ github.ref_name }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build image | |
run: docker build . --tag $IMAGE_NAME | |
- name: Log into registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Push image | |
if: ${{ github.ref_name == 'main' }} | |
env: | |
IMAGE_VERSION: latest | |
run: | | |
IMAGE_ID=ghcr.io/${{ github.repository }}/$IMAGE_NAME | |
docker tag $IMAGE_NAME $IMAGE_ID:$IMAGE_VERSION | |
docker push $IMAGE_ID:$IMAGE_VERSION |