File tree Expand file tree Collapse file tree 6 files changed +1297
-4
lines changed Expand file tree Collapse file tree 6 files changed +1297
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : Release integrations
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ workflow_dispatch :
7
+
8
+ jobs :
9
+ build-and-push-image :
10
+ runs-on : ubuntu-latest
11
+ permissions :
12
+ packages : write
13
+ contents : read
14
+ steps :
15
+ - name : Check out code
16
+ uses : actions/checkout@v2
17
+ - name : Build and push Docker image
18
+ run : |
19
+ # Loop through changed folders under integrations/
20
+ for file in $(git diff --name-only HEAD^ HEAD -- integrations/registry.yaml); do
21
+ # Get the type from registry.yaml
22
+ type=$(yq eval '.type' $file)
23
+ folder=$(dirname $file)
24
+ # Get the version from registry.yaml
25
+ version=$(yq eval '.version' $file)
26
+
27
+ # Check if the version exists in the registry
28
+ if docker pull ghcr.io/port-labs/port-ocean-$type:$version; then
29
+ echo "Image already exists in the registry: port-ocean-$type:$version"
30
+ else
31
+ echo "Building and pushing new image: port-ocean-$type:$version"
32
+ docker build -t ghcr.io/port-labs/port-ocean-$type:$version $folder
33
+ docker push ghcr.io/port-labs/port-ocean-$type:$version
34
+ fi
35
+ done
Original file line number Diff line number Diff line change 1
1
from typing import Any , Dict , List
2
- from integrations . pager_duty . clients .pager_duty import PagerDutyClient
2
+ from clients .pager_duty import PagerDutyClient
3
3
4
4
5
5
from port_ocean .context .event import event_context
You can’t perform that action at this time.
0 commit comments