feat(build-push-to-dockerhub): enable docker mirror for buildx on self-hosted runners #1336
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check for non-releasable actions | |
on: | |
pull_request: | |
types: | |
- edited | |
- opened | |
- ready_for_review | |
- synchronize | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
check-for-non-releasable-actions: | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Harden the runner (Audit all outbound calls) | |
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0 | |
with: | |
egress-policy: audit | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
sparse-checkout: | | |
./actions | |
./release-please-config.json | |
- name: Check for non-releasable actions | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 | |
with: | |
script: | | |
const fs = require('fs/promises'); | |
const releasePleaseConfig = JSON.parse(await fs.readFile('release-please-config.json', 'utf-8')); | |
const configuredPackageNames = new Set(Object.keys(releasePleaseConfig.packages)); | |
const packageNames = new Set(); | |
const folders = await fs.readdir('actions', { withFileTypes: true }); | |
for (const folder of folders) { | |
if (folder.isDirectory()) { | |
packageNames.add('actions/' + folder.name); | |
} | |
} | |
const missingConfigurations = [...packageNames].filter(pkg => !configuredPackageNames.has(pkg)); | |
if (missingConfigurations.length > 0) { | |
console.log('The following actions are missing from the release-please-config.json file and thus won\'t be automatically released:'); | |
console.log(missingConfigurations.join('\n')); | |
console.log('Please add them in release-please-config.json!'); | |
} else { | |
console.log('All actions are releasable!'); | |
} |