Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
split build into jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
liisaratsep committed Jun 29, 2022
1 parent 4cb23f9 commit 132d706
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker
name: Docker build

on:
push:
Expand All @@ -15,7 +15,7 @@ jobs:

runs-on: ubuntu-latest
permissions:
contents: write
contents: read
packages: write

steps:
Expand Down Expand Up @@ -75,6 +75,36 @@ jobs:
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }}:latest
cache-to: type=inline

sbom:

runs-on: ubuntu-latest
permissions:
contents: write
packages: read

steps:

- name: Extract semver
id: get_version
uses: battila7/get-version-action@v2

# Lowercase image name, as mixed case is not allowed while caching
- name: lowercase IMAGE_NAME
run: |
echo "IMAGE_NAME_LOWER=${IMAGE_NAME,,}" >>${GITHUB_ENV}
env:
IMAGE_NAME: '${{ env.IMAGE_NAME }}'

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Generate SBOM
uses: anchore/[email protected]
with:
Expand Down

0 comments on commit 132d706

Please sign in to comment.