Skip to content

Commit 4911943

Browse files
Change: push image to opensight-dev project (#65)
1 parent f34eac5 commit 4911943

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

.github/workflows/push-compare.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
user: ${{ secrets.GREENBONE_REGISTRY_USER }}
3737
password: ${{ secrets.GREENBONE_REGISTRY_TOKEN }}
3838
repository: opensight-postgres
39-
namespace: opensight
39+
namespace: opensight-dev
4040
compare-repository: postgres
4141
tag: ${{ inputs.postgres-major-version }}
4242
mode: lt
@@ -63,17 +63,17 @@ jobs:
6363
user: ${{ secrets.GREENBONE_REGISTRY_USER }}
6464
password: ${{ secrets.GREENBONE_REGISTRY_TOKEN }}
6565
repository: opensight-postgres
66-
namespace: opensight
66+
namespace: opensight-dev
6767

6868
- name: Increment opensight-postgres service version
6969
if: ${{ steps.compare.outputs.output == 'true' }}
7070
id: version
7171
shell: bash
7272
run: |
7373
set +e
74-
# Get latest minor version from dockerhub
74+
# Get latest postgres minor version from dockerhub filtered by major version.
7575
dt="$(echo -e '${{ steps.dtags.outputs.output }}' | grep -E '^${{ inputs.postgres-major-version }}.[0-9]+$' | sort -Vr | sed q)"
76-
echo "New postgres version on dockerhub: $dt"
76+
echo "Current postgres version on dockerhub: $dt"
7777
if ! [ "$dt" ]; then
7878
echo 'No postgres release on dockerhub found for major version: ${{ inputs.postgres-major-version }}'
7979
exit 1
@@ -85,9 +85,8 @@ jobs:
8585
echo "No postgres minor version found on dockerhub: $dt"
8686
exit 2
8787
fi
88-
echo "New minor version: $minor"
8988
90-
# Get the latest tag filtered by postgres major version.
89+
# Get the latest opensight-postgres tag filtered by dockerhub postgres minor version.
9190
t="$(echo -e '${{ steps.tags.outputs.output }}' | grep -E "^${{ inputs.postgres-major-version }}.$minor.[0-9]+$" | sort -Vr | sed q)"
9291
if [ "$t" ]; then
9392
echo "Current opensight-postgres version: $t"

.github/workflows/push.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
cosign-key: ${{ secrets.COSIGN_KEY_OPENSIGHT }}
5454
cosign-key-password: ${{ secrets.COSIGN_KEY_PASSWORD_OPENSIGHT }}
5555
cosign-tlog-upload: "false"
56-
image-url: opensight/opensight-postgres
56+
image-url: opensight-dev/opensight-postgres
5757
image-labels: |
5858
org.opencontainers.image.vendor=Greenbone
5959
org.opencontainers.image.base.name=postgres:${{ inputs.postgres-major-version }}
@@ -71,7 +71,7 @@ jobs:
7171
- name: Service upgrade matrix
7272
id: upgrade
7373
run: |
74-
echo "matrix=$(echo '${{ inputs.services }}' | jq -r '{include:[.[] | {service: ., "image-url": "opensight/opensight-postgres", digest: "${{ steps.build.outputs.digest }}", version: "${{ inputs.version }}" }]} | @json')" >> $GITHUB_OUTPUT
74+
echo "matrix=$(echo '${{ inputs.services }}' | jq -r '{include:[.[] | {service: ., "image-url": "opensight-dev/opensight-postgres", digest: "${{ steps.build.outputs.digest }}", version: "${{ inputs.version }}" }]} | @json')" >> $GITHUB_OUTPUT
7575
7676
outputs:
7777
matrix: ${{ steps.upgrade.outputs.matrix }}
@@ -118,7 +118,7 @@ jobs:
118118
needs: push-postgres
119119
uses: greenbone/workflows/.github/workflows/generate-and-push-sbom-with-trivy-3rd-gen.yml@main
120120
with:
121-
image-url: "${{ vars.GREENBONE_REGISTRY}}/opensight/opensight-postgres:${{ inputs.version }}"
121+
image-url: "${{ vars.GREENBONE_REGISTRY}}/opensight-dev/opensight-postgres:${{ inputs.version }}"
122122
image-registry-username-secret-name: "GREENBONE_REGISTRY_READ_USER"
123123
image-registry-password-secret-name: "GREENBONE_REGISTRY_READ_TOKEN"
124124
output-file-name: 'opensight-postgres.${{ inputs.version }}.sbom.json'

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Release New Major Version
22

33
on:
44
workflow_dispatch:

0 commit comments

Comments
 (0)