Auto Updates #3457
This file contains 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: Auto Updates | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '5 1 * * *' | |
- cron: '5 13 * * *' | |
#- cron: '15 */1 * * *' | |
jobs: | |
run-updates: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: master | |
fetch-depth: 10 | |
token: ${{ secrets.GITHUB_PAT }} | |
# Cache for Composer | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
# Cache for full update | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ github.workspace }}/tmp | |
key: ${{ runner.os }}-php-version-audit-${{ hashFiles('**/docs/rules-v1.json') }} | |
restore-keys: | | |
${{ runner.os }}-php-version-audit- | |
- name: Change origin to bypass gh-pages issues with actions | |
run: git remote set-url origin https://x-access-token:${{ secrets.GITHUB_PAT }}@github.com/lightswitch05/php-version-audit.git | |
- name: Ensure latest commit with tags | |
run: git fetch; git fetch --tags --all; git checkout master; git pull | |
- name: Install dependencies | |
run: docker-compose run --rm composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader | |
- name: Run Update | |
run: docker-compose run --rm php-version-audit --full-update --no-update --vvv | |
- name: commit updates | |
run: ./github-commit-auto-updates.sh | |
build: | |
runs-on: ubuntu-latest | |
needs: run-updates | |
strategy: | |
fail-fast: false | |
matrix: | |
TARGET: | |
- alpine | |
- buster | |
- bullseye | |
- bookworm | |
env: | |
TARGET: ${{matrix.TARGET}} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Tag and push all images | |
run: | | |
docker login --username=${{ secrets.DOCKERHUB_USER }} --password=${{ secrets.DOCKERHUB_PASS }} | |
./tag-and-push-images.sh ${TARGET} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_PAT }} |