Skip to content

chore(deps): lock file maintenance #777

chore(deps): lock file maintenance

chore(deps): lock file maintenance #777

name: Docker Build Test
on:
pull_request:
paths-ignore:
- 'docs/**'
- '**.md**'
branches: [main]
workflow_dispatch:
jobs:
check-docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- name: Download portal-client image manifest
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2
with:
github_token: ${{secrets.ACTION_DOWNLOAD_ARTIFACT_GITHUB_TOKEN}}
workflow: build-docker-cache-artifacts.yml
workflow_conclusion: success
branch: main
name: portal-client-index
path: /tmp/portal-manifest
repo: USSF-ORBIT/ussf-portal-client
if_no_artifact_found: warn
- name: Get docker image digest from portal-client manifest
id: portal_manifest
run: |
digest=$(cat /tmp/portal-manifest/index.json | jq -r '.manifests[0].digest')
echo "portal_client_docker_tag=${digest##sha256:}" >> $GITHUB_OUTPUT
- name: Restore portal-client Docker build cache
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
id: restore-client-cache
with:
path: /tmp/portal-client
key: ${{ runner.os }}-docker-portal-client-${{ steps.portal_manifest.outputs.portal_client_docker_tag }}
- name: If portal-client build cache not found locally, download portal-client build cache
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2
if: steps.restore-client-cache.outputs.cache-hit != 'true'
with:
github_token: ${{secrets.ACTION_DOWNLOAD_ARTIFACT_GITHUB_TOKEN}}
workflow: build-docker-cache-artifacts.yml
workflow_conclusion: success
branch: main
name: portal-client
path: /tmp/portal-client
repo: USSF-ORBIT/ussf-portal-client
if_no_artifact_found: warn
- name: If portal-client build cache not found locally, save it to this repo's GHA cache
uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
if: steps.restore-client-cache.outputs.cache-hit != 'true'
with:
path: /tmp/portal-client
key: ${{ runner.os }}-docker-portal-client-${{ steps.portal_manifest.outputs.portal_client_docker_tag }}
- uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2
id: buildx
with:
install: true
- name: Add DoD Certificate Bundle
env:
CERT_BUNDLE_SHA256: ${{ secrets.DOD_CA_CERT_BUNDLE_SHA256 }}
run: |
echo "$CERT_BUNDLE_SHA256" > scripts/dod_ca_cert_bundle.sha256
- name: Build
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4
with:
context: .
push: false
tags: portal-client:${{ github.sha }}
build-args: |
BUILD=${{ github.sha }}
cache-from: |
type=local,src=/tmp/portal-client,tag=e2e