Skip to content

Commit

Permalink
Fixes after fork
Browse files Browse the repository at this point in the history
  • Loading branch information
kkochel committed Feb 20, 2024
1 parent e58d976 commit ece5806
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 75 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/build_pr_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
context: ./sda-auth
push: true
tags: |
ghcr.io/${{ steps.lower-repo.outputs.repository }}:sha-${{ github.sha }}-auth
ghcr.io/${{ steps.lower-repo.outputs.repository }}:PR${{ github.event.number }}-auth
ghcr.io/biobanklab/sensitive-data-archive:sha-${{ github.sha }}-auth
ghcr.io/biobanklab/sensitive-data-archive:PR${{ github.event.number }}-auth
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand All @@ -57,8 +57,8 @@ jobs:
context: ./sda-download
push: true
tags: |
ghcr.io/${{ steps.lower-repo.outputs.repository }}:sha-${{ github.sha }}-download
ghcr.io/${{ steps.lower-repo.outputs.repository }}:PR${{ github.event.number }}-download
ghcr.io/biobanklab/sensitive-data-archive:sha-${{ github.sha }}-download
ghcr.io/biobanklab/sensitive-data-archive:PR${{ github.event.number }}-download
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand All @@ -70,8 +70,8 @@ jobs:
context: ./sda
push: true
tags: |
ghcr.io/${{ steps.lower-repo.outputs.repository }}:sha-${{ github.sha }}
ghcr.io/${{ steps.lower-repo.outputs.repository }}:PR${{ github.event.number }}
ghcr.io/biobanklab/sensitive-data-archive:sha-${{ github.sha }}
ghcr.io/biobanklab/sensitive-data-archive:PR${{ github.event.number }}
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand Down Expand Up @@ -101,8 +101,8 @@ jobs:
context: ./postgresql
push: true
tags: |
ghcr.io/${{ steps.lower-repo.outputs.repository }}:sha-${{ github.sha }}-postgres
ghcr.io/${{ steps.lower-repo.outputs.repository }}:PR${{ github.event.number }}-postgres
ghcr.io/biobanklab/sensitive-data-archive:sha-${{ github.sha }}-postgres
ghcr.io/biobanklab/sensitive-data-archive:PR${{ github.event.number }}-postgres
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand All @@ -114,8 +114,8 @@ jobs:
context: ./rabbitmq
push: true
tags: |
ghcr.io/${{ steps.lower-repo.outputs.repository }}:sha-${{ github.sha }}-rabbitmq
ghcr.io/${{ steps.lower-repo.outputs.repository }}:PR${{ github.event.number }}-rabbitmq
ghcr.io/biobanklab/sensitive-data-archive:sha-${{ github.sha }}-rabbitmq
ghcr.io/biobanklab/sensitive-data-archive:PR${{ github.event.number }}-rabbitmq
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand All @@ -124,7 +124,7 @@ jobs:
- name: Run Trivy vulnerability scanner on postgres
uses: aquasecurity/trivy-action@0.17.0
with:
image-ref: ghcr.io/${{ steps.lower-repo.outputs.repository }}:sha-${{ github.sha }}-postgres
image-ref: ghcr.io/biobanklab/sensitive-data-archive:sha-${{ github.sha }}-postgres
format: "sarif"
hide-progress: true
ignore-unfixed: true
Expand All @@ -139,7 +139,7 @@ jobs:
- name: Run Trivy vulnerability scanner on rabbitmq
uses: aquasecurity/trivy-action@0.17.0
with:
image-ref: ghcr.io/${{ steps.lower-repo.outputs.repository }}:sha-${{ github.sha }}-rabbitmq
image-ref: ghcr.io/biobanklab/sensitive-data-archive:sha-${{ github.sha }}-rabbitmq
format: "sarif"
hide-progress: true
ignore-unfixed: true
Expand Down Expand Up @@ -175,8 +175,8 @@ jobs:
context: ./sda-sftp-inbox
push: true
tags: |
ghcr.io/${{ steps.lower-repo.outputs.repository }}:sha-${{ github.sha }}-sftp-inbox
ghcr.io/${{ steps.lower-repo.outputs.repository }}:PR${{ github.event.number }}-sftp-inbox
ghcr.io/biobanklab/sensitive-data-archive:sha-${{ github.sha }}-sftp-inbox
ghcr.io/biobanklab/sensitive-data-archive:PR${{ github.event.number }}-sftp-inbox
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand All @@ -185,7 +185,7 @@ jobs:
- name: Run Trivy vulnerability scanner on sftp-inbox
uses: aquasecurity/trivy-action@0.17.0
with:
image-ref: ghcr.io/${{ steps.lower-repo.outputs.repository }}:sha-${{ github.sha }}-sftp-inbox
image-ref: ghcr.io/biobanklab/sensitive-data-archive:sha-${{ github.sha }}-sftp-inbox
format: "sarif"
hide-progress: true
ignore-unfixed: true
Expand Down
33 changes: 14 additions & 19 deletions .github/workflows/publish_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,47 +52,42 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- id: lower-repo
shell: pwsh
run: |
"::set-output name=repository::$($env:GITHUB_REPOSITORY.ToLowerInvariant())"
- name: Pull PR containers
run : |
for t in -auth -download -postgres -rabbitmq -sftp-inbox; do
docker pull ghcr.io/${{ steps.lower-repo.outputs.repository }}:PR${{ github.event.number }}$t
docker pull ghcr.io/biobanklab/sensitive-data-archive:PR${{ github.event.number }}$t
done
docker pull ghcr.io/${{ steps.lower-repo.outputs.repository }}:PR${{ github.event.number }}
docker pull ghcr.io/biobanklab/sensitive-data-archive:PR${{ github.event.number }}
- name: Retag PR image for auth
run: |
docker tag ghcr.io/${{ steps.lower-repo.outputs.repository }}:PR${{ github.event.number }}-auth ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ needs.tag_release.outputs.tag }}-auth
docker push ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ needs.tag_release.outputs.tag }}-auth
docker tag ghcr.io/biobanklab/sensitive-data-archive:PR${{ github.event.number }}-auth ghcr.io/biobanklab/sensitive-data-archive:${{ needs.tag_release.outputs.tag }}-auth
docker push ghcr.io/biobanklab/sensitive-data-archive:${{ needs.tag_release.outputs.tag }}-auth
- name: Retag PR image for download
run: |
docker tag ghcr.io/${{ steps.lower-repo.outputs.repository }}:PR${{ github.event.number }}-download ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ needs.tag_release.outputs.tag }}-download
docker push ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ needs.tag_release.outputs.tag }}-download
docker tag ghcr.io/biobanklab/sensitive-data-archive:PR${{ github.event.number }}-download ghcr.io/biobanklab/sensitive-data-archive:${{ needs.tag_release.outputs.tag }}-download
docker push ghcr.io/biobanklab/sensitive-data-archive:${{ needs.tag_release.outputs.tag }}-download
- name: Retag PR image for postgres
run: |
docker tag ghcr.io/${{ steps.lower-repo.outputs.repository }}:PR${{ github.event.number }}-postgres ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ needs.tag_release.outputs.tag }}-postgres
docker push ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ needs.tag_release.outputs.tag }}-postgres
docker tag ghcr.io/biobanklab/sensitive-data-archive:PR${{ github.event.number }}-postgres ghcr.io/biobanklab/sensitive-data-archive:${{ needs.tag_release.outputs.tag }}-postgres
docker push ghcr.io/biobanklab/sensitive-data-archive:${{ needs.tag_release.outputs.tag }}-postgres
- name: Retag PR image for rabbitmq
run: |
docker tag ghcr.io/${{ steps.lower-repo.outputs.repository }}:PR${{ github.event.number }}-rabbitmq ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ needs.tag_release.outputs.tag }}-rabbitmq
docker push ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ needs.tag_release.outputs.tag }}-rabbitmq
docker tag ghcr.io/biobanklab/sensitive-data-archive:PR${{ github.event.number }}-rabbitmq ghcr.io/biobanklab/sensitive-data-archive:${{ needs.tag_release.outputs.tag }}-rabbitmq
docker push ghcr.io/biobanklab/sensitive-data-archive:${{ needs.tag_release.outputs.tag }}-rabbitmq
- name: Retag PR image for sftp-inbox
run: |
docker tag ghcr.io/${{ steps.lower-repo.outputs.repository }}:PR${{ github.event.number }}-sftp-inbox ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ needs.tag_release.outputs.tag }}-sftp-inbox
docker push ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ needs.tag_release.outputs.tag }}-sftp-inbox
docker tag ghcr.io/biobanklab/sensitive-data-archive:PR${{ github.event.number }}-sftp-inbox ghcr.io/biobanklab/sensitive-data-archive:${{ needs.tag_release.outputs.tag }}-sftp-inbox
docker push ghcr.io/biobanklab/sensitive-data-archive:${{ needs.tag_release.outputs.tag }}-sftp-inbox
- name: Retag PR image for sensitive-data-archive
run: |
docker tag ghcr.io/${{ steps.lower-repo.outputs.repository }}:PR${{ github.event.number }} ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ needs.tag_release.outputs.tag }}
docker push ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ needs.tag_release.outputs.tag }}
docker tag ghcr.io/biobanklab/sensitive-data-archive:PR${{ github.event.number }} ghcr.io/biobanklab/sensitive-data-archive:${{ needs.tag_release.outputs.tag }}
docker push ghcr.io/biobanklab/sensitive-data-archive:${{ needs.tag_release.outputs.tag }}
bump_chart_version:
needs: [tag_release, push_to_registry]
Expand Down
9 changes: 2 additions & 7 deletions sda-auth/.github/workflows/build_pr_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- id: lower-repo
shell: pwsh
run: |
"::set-output name=repository::$($env:GITHUB_REPOSITORY.ToLowerInvariant())"
- name: Log in to the Github Container registry
uses: docker/login-action@v2
with:
Expand All @@ -37,8 +32,8 @@ jobs:
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ steps.lower-repo.outputs.repository }}:PR${{ github.event.number }}
ghcr.io/${{ steps.lower-repo.outputs.repository }}:sha-${{ github.sha }}
ghcr.io/biobanklab/sensitive-data-archive:PR${{ github.event.number }}
ghcr.io/biobanklab/sensitive-data-archive:sha-${{ github.sha }}
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand Down
11 changes: 3 additions & 8 deletions sda-auth/.github/workflows/tag_and_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3

- id: lower-repo
shell: pwsh
run: |
"::set-output name=repository::$($env:GITHUB_REPOSITORY.ToLowerInvariant())"
- name: Log in to the Github Container registry
uses: docker/login-action@v2
with:
Expand All @@ -57,7 +52,7 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ steps.lower-repo.outputs.repository }}
images: ghcr.io/biobanklab/sensitive-data-archive

- name: Build and push
uses: docker/build-push-action@v4
Expand All @@ -66,8 +61,8 @@ jobs:
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ needs.tag.outputs.tag }}
ghcr.io/${{ steps.lower-repo.outputs.repository }}:latest
ghcr.io/biobanklab/sensitive-data-archive:${{ needs.tag.outputs.tag }}
ghcr.io/biobanklab/sensitive-data-archive:latest
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand Down
15 changes: 5 additions & 10 deletions sda-download/.github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v4

- id: lower-repo
shell: pwsh
run: |
"::set-output name=repository::$($env:GITHUB_REPOSITORY.ToLowerInvariant())"
- name: Log in to the Github Container registry
uses: docker/login-action@v3
with:
Expand All @@ -57,7 +52,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ steps.lower-repo.outputs.repository }}
images: ghcr.io/biobanklab/sensitive-data-archive

- name: Build and push
uses: docker/build-push-action@v5
Expand All @@ -66,10 +61,10 @@ jobs:
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ needs.tag.outputs.tag }}
ghcr.io/${{ steps.lower-repo.outputs.repository }}:latest
${{ steps.lower-repo.outputs.repository }}:${{ needs.tag.outputs.tag }}
${{ steps.lower-repo.outputs.repository }}:latest
ghcr.io/biobanklab/sensitive-data-archive:${{ needs.tag.outputs.tag }}
ghcr.io/biobanklab/sensitive-data-archive:latest
biobanklab/sensitive-data-archive:${{ needs.tag.outputs.tag }}
biobanklab/sensitive-data-archive:latest
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand Down
15 changes: 5 additions & 10 deletions sda-sftp-inbox/.github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3

- id: lower-repo
shell: pwsh
run: |
"::set-output name=repository::$($env:GITHUB_REPOSITORY.ToLowerInvariant())"
- name: Log in to the Github Container registry
uses: docker/login-action@v2
with:
Expand All @@ -57,7 +52,7 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ steps.lower-repo.outputs.repository }}
images: ghcr.io/biobanklab/sensitive-data-archive

- name: Build and push
uses: docker/build-push-action@v4
Expand All @@ -66,10 +61,10 @@ jobs:
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ steps.lower-repo.outputs.repository }}:${{ needs.tag.outputs.tag }}
ghcr.io/${{ steps.lower-repo.outputs.repository }}:latest
${{ steps.lower-repo.outputs.repository }}:${{ needs.tag.outputs.tag }}
${{ steps.lower-repo.outputs.repository }}:latest
ghcr.io/biobanklab/sensitive-data-archive:${{ needs.tag.outputs.tag }}
ghcr.io/biobanklab/sensitive-data-archive:latest
biobanklab/sensitive-data-archive:${{ needs.tag.outputs.tag }}
biobanklab/sensitive-data-archive:latest
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand Down
7 changes: 1 addition & 6 deletions sda-sftp-inbox/.github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- id: lower-repo
shell: pwsh
run: |
"::set-output name=repository::$($env:GITHUB_REPOSITORY.ToLowerInvariant())"
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@8bd2f9fbda2109502356ff8a6a89da55b1ead252
with:
image-ref: 'ghcr.io/${{ steps.lower-repo.outputs.repository }}:latest'
image-ref: 'ghcr.io/biobanklab/sensitive-data-archive:latest'
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
Expand Down

0 comments on commit ece5806

Please sign in to comment.