Sync with upstream #945
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: ci | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
# Job to run change detection | |
changes: | |
runs-on: ubuntu-latest | |
outputs: | |
# Expose matched filters as job 'images' output variable | |
images: ${{ steps.filter.outputs.changes }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Determine Paths to Build for Auto Trigger | |
uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
# Use context to get the branch where commits were pushed. | |
# If there is only one long-lived branch (e.g. master), | |
# you can specify it directly. | |
# If it's not configured, the repository default branch is used. | |
base: ${{ github.ref }} | |
filters: | | |
acme/certbot: 'acme/certbot/**' | |
acme/certbot-dns-cloudflare: 'acme/certbot-dns-cloudflare/**' | |
acme/lego: 'acme/lego/**' | |
aws-cli: 'aws-cli/**' | |
black: 'black/**' | |
buildpack-deps/ubuntu/focal: 'buildpack-deps/ubuntu/focal/**' | |
buildpack-deps/ubuntu/jammy: 'buildpack-deps/ubuntu/jammy/**' | |
buildpack-deps/ubuntu/noble: 'buildpack-deps/ubuntu/noble/**' | |
cinc/cinc-auditor: 'cinc/cinc-auditor/**' | |
couchdb: 'couchdb/**' | |
doctl: 'doctl/**' | |
dokken/almalinux-8: 'dokken/almalinux-8/**' | |
dokken/almalinux-9: 'dokken/almalinux-9/**' | |
dokken/amazonlinux-2: 'dokken/amazonlinux-2/**' | |
dokken/amazonlinux-2023: 'dokken/amazonlinux-2023/**' | |
dokken/centos-stream-9: 'dokken/centos-stream-9/**' | |
dokken/cinc: 'dokken/cinc/**' | |
dokken/debian-11: 'dokken/debian-11/**' | |
dokken/debian-12: 'dokken/debian-12/**' | |
dokken/eurolinux-9: 'dokken/eurolinux-9/**' | |
dokken/opensuse-leap-15.3: 'dokken/opensuse-leap-15.3/**' | |
dokken/opensuse-leap-15.4: 'dokken/opensuse-leap-15.4/**' | |
dokken/opensuse-leap-15.5: 'dokken/opensuse-leap-15.5/**' | |
dokken/opensuse-leap-15.6: 'dokken/opensuse-leap-15.6/**' | |
dokken/oraclelinux-8: 'dokken/oraclelinux-8/**' | |
dokken/oraclelinux-9: 'dokken/oraclelinux-9/**' | |
dokken/rockylinux-8: 'dokken/rockylinux-8/**' | |
dokken/rockylinux-9: 'dokken/rockylinux-9/**' | |
dokken/ubuntu-20.04: 'dokken/ubuntu-20.04/**' | |
dokken/ubuntu-22.04: 'dokken/ubuntu-22.04/**' | |
dokken/ubuntu-24.04: 'dokken/ubuntu-24.04/**' | |
flake8: 'flake8/**' | |
github-cli: 'github-cli/**' | |
glab: 'glab/**' | |
go2chef: 'go2chef/**' | |
golang/1.20/jammy: 'golang/1.20/jammy/**' | |
golang/1.21/jammy: 'golang/1.21/jammy/**' | |
golang/1.22/jammy: 'golang/1.22/jammy/**' | |
golang/1.23/jammy: 'golang/1.23/jammy/**' | |
grafana/grafana-oss: 'grafana/grafana-oss/**' | |
hadolint: 'hadolint/**' | |
hashicorp/terraform: 'hashicorp/terraform/**' | |
jfrog/jfrog-cli: 'jfrog/jfrog-cli/**' | |
ldap-utils: 'ldap-utils/**' | |
markdownlint: 'markdownlint/**' | |
meshcmd: 'meshcmd/**' | |
netbox: 'netbox/**' | |
node/18/jammy-slim: 'node/18/jammy-slim/**' | |
node/20/jammy-slim: 'node/20/jammy-slim/**' | |
node/22/jammy-slim: 'node/22/jammy-slim/**' | |
op: 'op/**' | |
paperspace-cli: 'paperspace-cli/**' | |
portainer-ce: 'portainer-ce/**' | |
postgres/15/jammy: 'postgres/15/jammy/**' | |
postgres/16/jammy: 'postgres/16/jammy/**' | |
prometheus/alertmanager: 'prometheus/alertmanager/**' | |
prometheus/blackbox_exporter: 'prometheus/blackbox_exporter/**' | |
prometheus/collectd_exporter: 'prometheus/collectd_exporter/**' | |
prometheus/node_exporter: 'prometheus/node_exporter/**' | |
prometheus/prometheus: 'prometheus/prometheus/**' | |
pspace: 'pspace/**' | |
pulumi/pulumi-base: 'pulumi/pulumi-base/**' | |
pulumi/pulumi-python: 'pulumi/pulumi-python/**' | |
redis/7.2/jammy: 'redis/7.2/jammy/**' | |
ruby/3.1/jammy: 'ruby/3.1/jammy/**' | |
ruby/3.1/slim-jammy: 'ruby/3.1/slim-jammy/**' | |
ruby/3.2/jammy: 'ruby/3.2/jammy/**' | |
ruby/3.2/slim-jammy: 'ruby/3.2/slim-jammy/**' | |
ruby/3.3/jammy: 'ruby/3.3/jammy/**' | |
ruby/3.3/slim-jammy: 'ruby/3.3/slim-jammy/**' | |
shellcheck: 'shellcheck/**' | |
smokeping: 'smokeping/**' | |
ubuntu-autoinstall: 'ubuntu-autoinstall/**' | |
# Job to build and test each of the modified images | |
build: | |
needs: changes | |
strategy: | |
matrix: | |
# Parse JSON array containing names of all filters matching any of changed files | |
# e.g. ['image1', 'image2'] if both image folders contains changes | |
image: ${{ fromJSON(needs.changes.outputs.images) }} | |
if: ${{ needs.changes.outputs.images != '[]' && needs.changes.outputs.images != '' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: polymathrobotics/container-build-publish-action@main | |
with: | |
workdir: ${{ matrix.image }} | |
dockerhub-username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} | |
dockerhub-password: ${{ secrets.CONTAINER_DESCRIPTION_PASSWORD }} |