Skip to content

Commit

Permalink
chore: Internal GitHub Action migration (#375)
Browse files Browse the repository at this point in the history
* Update GHA path
* Push image to registry
  • Loading branch information
patjouk committed Mar 18, 2024
1 parent a56232e commit 55ff26e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ env:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -78,9 +81,19 @@ jobs:
- name: Build an image from Dockerfile
run: |
docker build -t ${{ env.IMAGE_NAME }}:${{ github.sha }} . --build-arg COMMIT_SHA=${{ github.sha }}
- name: Login to container registry
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
registry: "ghcr.io"
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push image
run: |
docker tag ${{ github.repository }}:${{ github.sha }} ghcr.io/${{ github.repository }}
docker tag ${{ github.repository }}:${{ github.sha }} ghcr.io/${{ github.repository }}:${{ github.sha }}
docker push --all-tags ghcr.io/${{ github.repository }}
- name: Create SBOM
uses: digitalservicebund/github-actions/create-sbom@c6b78c632c4b017802d3e3ce9706a43b9380f804
uses: digitalservicebund/create-sbom@095884614dac5ea922dfcb09cce2e22f3d6391a3 # v1.1.0
with:
image_name: ${{ env.IMAGE_NAME }}:${{ github.sha }}

Expand Down Expand Up @@ -133,7 +146,7 @@ jobs:
security-events: write
steps:
- name: validate github workflow files to have pinned versions
uses: digitalservicebund/github-actions/github-actions-linter@c6b78c632c4b017802d3e3ce9706a43b9380f804 # v0.1.10
uses: digitalservicebund/github-actions-linter@dccac3ada437947aada4bc901daff08ceb87c3f1 # v0.1.11

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@062f2592684a31eb3aa050cc61e7ca1451cecd3d # v0.18.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: validate github workflow files to have pinned versions
uses: digitalservicebund/github-actions/github-actions-linter@c6b78c632c4b017802d3e3ce9706a43b9380f804 # v0.1.10
uses: digitalservicebund/github-actions-linter@dccac3ada437947aada4bc901daff08ceb87c3f1 # v0.1.11
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@062f2592684a31eb3aa050cc61e7ca1451cecd3d # v0.18.0
env:
Expand Down
4 changes: 2 additions & 2 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ fileignoreconfig:
- filename: .github/workflows/secrets-check.yml
checksum: 20e55c98a60e39438b1843b02f289c5d729a781e95bdebf025d6e8768a1768d4
- filename: .github/workflows/scan.yml
checksum: e784264e477bd223e605cb5a90b4b02a5bf7584509ea43755c90895d5b66b642
checksum: 0f25095d1bd0041f62301389e0d7db75fdeac0927d60a6f192ac72f81f391fc6
- filename: .github/workflows/pipeline.yml
checksum: 6d9a0d440172ce75e34ccfce6ba87b55d7b61070c2137ff1578bff6025180c42
checksum: 5ae5f41ca18153e4d8a8580d0c0137caaa3e43b5bb102e9acea0b984c8943678
scopeconfig:
- scope: node
allowed_patterns:
Expand Down

0 comments on commit 55ff26e

Please sign in to comment.