Skip to content

Commit

Permalink
Remove compare containers
Browse files Browse the repository at this point in the history
  • Loading branch information
sarg3nt committed Nov 8, 2024
1 parent 70e7241 commit c6860e1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 84 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/release-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,47 +39,31 @@ jobs:
fetch-depth: 0
fetch-tags: true

- name: Get the latest version
- name: Get the Latest Version
id: get_version
run: bash ${GITHUB_WORKSPACE}/workflow_scripts/get_latest_version.sh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REGISTRY: ${{ env.REGISTRY }}
REPOSITORY: ${{ env.REPOSITORY }}

- name: Log into registry
- name: Log Into Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image
- name: Build and Push Docker image
id: build
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
with:
push: false
tags: ${{ env.TAG_MAJOR }},${{ env.TAG_MINOR }},${{ env.TAG_PATCH }},${{ env.TAG_LATEST }}

- name: Compare the Old and New Docker Images
id: compare_versions
run: bash ${GITHUB_WORKSPACE}/workflow_scripts/compare_containers.sh
env:
GH_TOKEN: ${{ github.token }}
TAG_OLD: ${{ env.TAG_OLD }}
TAG_PATCH: ${{ env.TAG_PATCH }}

- name: Push Docker image
if: steps.compare_versions.outputs.continue == 'true'
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
with:
push: true
tags: ${{ env.TAG_MAJOR }},${{ env.TAG_MINOR }},${{ env.TAG_PATCH }},${{ env.TAG_LATEST }}

# Docs: https://github.com/marketplace/actions/create-release
- name: Create Release
id: create_release
if: steps.compare_versions.outputs.continue == 'true'
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5
with:
body: "A Weekly release containing upgrades to system packages in the base Rocky Linux container."
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
fetch-depth: 0
fetch-tags: true

- name: Log into registry
- name: Log Into Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# During a release workflow the new git tag is provided and is automatically used by this step to generate the new image tags.
- name: Extract Docker metadata
- name: Extract Docker Metadata
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
with:
Expand All @@ -50,7 +50,7 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push Docker image
- name: Build and Push Docker Image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
with:
context: .
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ jobs:
tuf-repo-cdn.sigstore.dev:443
www.bestpractices.dev:443
- name: "Checkout code"
- name: "Checkout Code"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false

- name: "Run analysis"
- name: "Run Analysis"
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46
with:
results_file: results.sarif
Expand All @@ -77,7 +77,7 @@ jobs:

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
- name: "Upload Artifact"
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: SARIF file
Expand All @@ -86,7 +86,7 @@ jobs:

# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
- name: "Upload to Code-Scanning"
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd
with:
sarif_file: results.sarif
10 changes: 5 additions & 5 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@ jobs:
disable-sudo: true
egress-policy: audit

- name: Log into registry
- name: Log Into Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout code
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Build Docker image
- name: Build Docker Image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
with:
push: false
tags: ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:${{ github.sha }}

- name: Run Trivy vulnerability scanner
- name: Run Trivy Vulnerability Scanner
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2
with:
image-ref: '${{ env.REGISTRY }}/${{ env.REPOSITORY }}:${{ github.sha }}'
Expand All @@ -64,7 +64,7 @@ jobs:
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
TRIVY_SKIP_JAVA_DB_UPDATE: true

- name: Upload Trivy scan results to GitHub Security tab
- name: Upload Trivy Results
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd
with:
sarif_file: 'trivy-results.sarif'
Expand Down
53 changes: 0 additions & 53 deletions workflow_scripts/compare_containers.sh

This file was deleted.

0 comments on commit c6860e1

Please sign in to comment.