Check and Push Updates #1730
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: Check and Push Updates | |
on: | |
schedule: | |
- cron: "0 12 * * *" | |
workflow_dispatch: | |
inputs: | |
forced: | |
type: string | |
required: false | |
description: "Space-seperated version numbers to force update of" | |
jobs: | |
bake: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: pip | |
- name: Install Requirements | |
run: | | |
python -m pip install pip wheel --upgrade | |
python -m pip install -r dev/requirements.txt | |
- name: Get Versions | |
id: script | |
run: python3 dev/baker.py --forced ${{ inputs.forced }} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
outputs: | |
matrixes: ${{ steps.script.outputs.matrixes }} | |
build: | |
needs: bake | |
if: ${{ fromJSON(needs.bake.outputs.matrixes).builder.include[0] != null }} | |
strategy: | |
matrix: ${{ fromJSON(needs.bake.outputs.matrixes).builder }} | |
permissions: | |
contents: read | |
packages: write | |
uses: NathanVaughn/reusable-actions/.github/workflows/docker-build-push.yml@main | |
with: | |
attest_id: ${{ matrix.attest_id }} | |
platform: ${{ matrix.platform }} | |
tags: ${{ matrix.tags }} | |
context: docker | |
dockerfile: docker/Dockerfile | |
buildargs: | | |
WEBTREES_VERSION=${{ matrix.webtrees_version }} | |
PHP_VERSION=${{ matrix.php_version }} | |
PATCH_VERSION=${{ matrix.patch_version }} | |
secrets: | |
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} | |
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
attest: | |
needs: | |
- bake | |
- build | |
strategy: | |
matrix: ${{ fromJSON(needs.bake.outputs.matrixes).attester }} | |
permissions: | |
id-token: write | |
contents: read | |
attestations: write | |
packages: write | |
uses: NathanVaughn/reusable-actions/.github/workflows/docker-attest.yml@main | |
with: | |
name: ${{ matrix.name }} | |
attest_id: ${{ matrix.attest_id }} | |
# secrets: | |
# dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} | |
# dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
update-dockerhub: | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Update DockerHub README | |
uses: christian-korneck/update-container-description-action@v1 | |
env: | |
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKER_PASS: ${{ secrets.DOCKERHUB_PASSWORD }} | |
with: | |
destination_container_repo: ${{ secrets.DOCKERHUB_USERNAME }}/webtrees | |
provider: dockerhub | |
short_description: ${{ github.event.repository.description }} | |
create-releases: | |
needs: | |
- bake | |
- build | |
if: ${{ fromJSON(needs.bake.outputs.matrixes).releaser.include[0] != null }} | |
strategy: | |
matrix: ${{ fromJSON(needs.bake.outputs.matrixes).releaser }} | |
permissions: | |
contents: write | |
uses: NathanVaughn/reusable-actions/.github/workflows/create-release.yml@main | |
with: | |
tag: ${{ matrix.tag }} | |
body: ${{ matrix.body }} | |
prerelease: ${{ matrix.prerelease }} |