Skip to content

Build and Push to Registry #286

Build and Push to Registry

Build and Push to Registry #286

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build and Push to Registry
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
schedule:
- cron: 0 6 * * 1,4
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-versions:
strategy:
max-parallel: 10
matrix:
version:
- '8.1'
- '8.2'
- '8.3'
variant:
- apache
- cli
- cli-alpine
- fpm
- fpm-alpine
uses: ./.github/workflows/build.yml
secrets: inherit
with:
version: ${{ matrix.version }}
variant: ${{ matrix.variant }}
latest: '8.3'
clear-cache:
runs-on: ubuntu-latest
needs: ['build-versions']
steps:
- name: Clear cache
uses: actions/github-script@v7
with:
script: |
console.log("About to clear")
let caches = null
const sleep = ms => new Promise(r => setTimeout(r, ms));
do {
caches = await github.rest.actions.getActionsCacheList({
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 100,
sort: 'created_at',
direction: 'asc'
})
for (let cache of caches.data.actions_caches) {
console.log(cache)
github.rest.actions.deleteActionsCacheById({
owner: context.repo.owner,
repo: context.repo.repo,
cache_id: cache.id,
})
}
//sleep 30 seconds before iterating again, to combat ratelimitting
await sleep(30000)
} while(caches?.data?.actions_caches?.length > 0)
console.log("Clear completed")