Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(docker): remove unused Docker Hub publishing workflow #381

Merged
merged 22 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e12a906
refactor(docker): remove unused Docker Hub publishing workflow
yacosta738 Oct 5, 2024
b3bbacc
refactor(docker): split docker build frontend and backend
yacosta738 Oct 5, 2024
8bcc129
ci(docker): new cache strategy
yacosta738 Oct 5, 2024
3182066
ci(docker): fix ghcr repo name
yacosta738 Oct 5, 2024
6012a71
fix: Name shadowed: organizationId
yacosta738 Oct 5, 2024
4fc03b0
chore: remove white space in version
yacosta738 Oct 5, 2024
7813d69
chore: remove user
yacosta738 Oct 5, 2024
39ae623
chore: Clean up unnecessary files
yacosta738 Oct 5, 2024
40accbd
refactor: Update Docker image vulnerability scanning in backend and f…
yacosta738 Oct 5, 2024
a7052f5
refactor: Update Docker image vulnerability scanning cache directorie…
yacosta738 Oct 5, 2024
b97bc6a
refactor: 🟢 Update Docker image vulnerability scanning cache director…
yacosta738 Oct 5, 2024
7f4ffce
refactor: 🟢 remove pre release workflow
yacosta738 Oct 5, 2024
168d638
ci: 🟢 category for detekt report
yacosta738 Oct 5, 2024
3777f2d
ci: 🟢 temporal list all images
yacosta738 Oct 6, 2024
550b1d4
Revert "ci: 🟢 temporal list all images"
yacosta738 Oct 6, 2024
bb58029
ci: 🟢 prod and non prod docker scan
yacosta738 Oct 6, 2024
1da55cf
ci: fix docker.io user or repository
yacosta738 Oct 6, 2024
8fbfd42
chore(deps): update frontend dependencies
yacosta738 Oct 6, 2024
25fa354
chore(deps): join the common steps
yacosta738 Oct 6, 2024
46f60a7
chore(deps): fix yaml syntax issues
yacosta738 Oct 6, 2024
a0edc7c
refactor: Update inline script declarations in Astro components
yacosta738 Oct 6, 2024
ffccf47
ci: Copy image between registries with GitHub Actions
yacosta738 Oct 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/analysis/security/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ runs:
uses: github/codeql-action/[email protected]
with:
sarif_file: build/reports/detekt/detekt.sarif
checkout_path: ${{ github.workspace }}
token: ${{ inputs.token }}
category: static-code-analysis
112 changes: 0 additions & 112 deletions .github/actions/docker/action.yml

This file was deleted.

80 changes: 80 additions & 0 deletions .github/actions/docker/backend/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Package and Publish Backend 📦
description: |
This workflow is responsible for packaging and publishing the backend application
to the container registry. It also performs vulnerability scanning.

inputs:
deliver:
description: 'Deliver backend to production'
required: true
default: 'true'
docker_username:
description: 'The username for Docker Hub'
required: true
docker_password:
description: 'The password for Docker Hub'
required: true
version:
description: 'The version of the backend'
required: true
ci_github_token:
description: 'GITHUB_TOKEN with permissions to push to the container registry'
required: true
gradle-encryption-key:
description: 'The encryption key to use for the gradle cache'
required: true

runs:
using: composite
steps:
- name: Install Java Tools & Dependencies
uses: ./.github/actions/install/java
with:
java-version: 21
gradle-encription-key: ${{ inputs.gradle-encryption-key }}

- name: Cache Gradle Dependencies
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Execute Gradle build
run: |
chmod +x gradlew
./gradlew assemble
./gradlew bootBuildImage -x test
shell: bash

- name: 🪄 Scan Docker images for vulnerabilities
uses: aquasecurity/[email protected]
with:
image-ref: ghcr.io/dallay/lyra:latest
format: sarif
output: trivy-lyra-report.sarif
severity: HIGH,CRITICAL
ignore-unfixed: true
cache-dir: /tmp/trivy-cache-lyra

- name: ⇪ Upload Trivy Scan Report
uses: actions/upload-artifact@v3
with:
name: trivy-lyra-report
path: trivy-lyra-report.sarif

- name: 🐳 Authenticate to Docker Hub and GHCR
run: |
echo ${{ inputs.ci_github_token }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
echo ${{ inputs.docker_password }} | docker login docker.io -u ${{ inputs.docker_username }} --password-stdin
shell: bash

- name: 🐳 Push Docker image to GHCR and Docker Hub
if: ${{ inputs.deliver }}
run: |
docker push --all-tags ${{ inputs.docker_username }}/lyra
docker push --all-tags ghcr.io/dallay/lyra
shell: bash
67 changes: 0 additions & 67 deletions .github/actions/docker/dockerhub/action.yml

This file was deleted.

Loading
Loading