-
Notifications
You must be signed in to change notification settings - Fork 7
56 lines (54 loc) · 1.47 KB
/
youtube.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
on:
workflow_dispatch:
push:
env:
DOCKER_REGISTRY: ghcr.io
DOCKER_TAG: ghcr.io/pcgeek86/pwsh-youtube
jobs:
updatebuildnumber:
runs-on: ubuntu-latest
steps:
- name: Clone Project Files
uses: actions/checkout@v3.5.0
- name: Increment project build number
shell: pwsh
run: |
[int](Get-Content -Path BuildNumber)+1 | Set-Content -Path BuildNumber
- name: Update Build Number
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Increment build number
file_pattern: BuildNumber
publish:
needs:
- updatebuildnumber
runs-on: ubuntu-latest
steps:
- name: Clone Project Files
uses: actions/checkout@v3.5.0
- name: Publish PowerShell Module
shell: pwsh
run: |
./build/publish.ps1 -PSGalleryApiKey ${{ secrets.POWERSHELL_GALLERY_APIKEY }}
docker:
needs:
- updatebuildnumber
permissions:
packages: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Clone Project Files
uses: actions/checkout@v3.5.0
- name: Log in to the Container registry
uses: docker/login-action@v2.1.0
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image to GitHub Packages
uses: docker/build-push-action@v4.0.0
with:
context: .
push: true
tags: ${{ env.DOCKER_TAG }}