File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : ghcr
2
+ on :
3
+ push :
4
+ tags :
5
+ - " v*"
6
+ env :
7
+ IMAGE_NAME : workshop-azure-openai
8
+ jobs :
9
+ ghcr :
10
+ runs-on : ubuntu-latest
11
+ timeout-minutes : 5
12
+ permissions :
13
+ packages : write
14
+ contents : read
15
+ steps :
16
+ - uses : actions/checkout@v4
17
+ - uses : docker/login-action@v3
18
+ with :
19
+ registry : ghcr.io
20
+ username : ${{ github.actor }}
21
+ password : ${{ secrets.GITHUB_TOKEN }}
22
+ - name : Set Versions
23
+ uses : actions/github-script@v7
24
+ id : set_version
25
+ with :
26
+ script : |
27
+ const tag = context.ref.substring(10)
28
+ const no_v = tag.replace('v', '')
29
+ const dash_index = no_v.lastIndexOf('-')
30
+ const no_dash = (dash_index > -1) ? no_v.substring(0, dash_index) : no_v
31
+ core.setOutput('tag', tag)
32
+ core.setOutput('no-v', no_v)
33
+ core.setOutput('no-dash', no_dash)
34
+ - name : Set meta data tag = ${{steps.set_version.outputs.no-dash}}
35
+ uses : docker/metadata-action@v5
36
+ id : meta
37
+ with :
38
+ images : ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
39
+ tags : |
40
+ type=semver,pattern={{version}},value=v${{steps.set_version.outputs.no-dash}}
41
+ type=raw,value=latest
42
+ - uses : docker/build-push-action@v5
43
+ with :
44
+ push : true
45
+ context : .
46
+ tags : ${{ steps.meta.outputs.tags }}
47
+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1
1
[ ![ test] ( https://github.com/ks6088ts-labs/workshop-azure-openai/actions/workflows/test.yaml/badge.svg?branch=main )] ( https://github.com/ks6088ts-labs/workshop-azure-openai/actions/workflows/test.yaml?query=branch%3Amain )
2
2
[ ![ docker] ( https://github.com/ks6088ts-labs/workshop-azure-openai/actions/workflows/docker.yaml/badge.svg?branch=main )] ( https://github.com/ks6088ts-labs/workshop-azure-openai/actions/workflows/docker.yaml?query=branch%3Amain )
3
3
[ ![ docker-release] ( https://github.com/ks6088ts-labs/workshop-azure-openai/actions/workflows/docker-release.yaml/badge.svg )] ( https://github.com/ks6088ts-labs/workshop-azure-openai/actions/workflows/docker-release.yaml )
4
+ [ ![ ghcr] ( https://github.com/ks6088ts-labs/workshop-azure-openai/actions/workflows/ghcr.yaml/badge.svg )] ( https://github.com/ks6088ts-labs/workshop-azure-openai/actions/workflows/ghcr.yaml )
4
5
5
6
# workshop-azure-openai
6
7
You can’t perform that action at this time.
0 commit comments