feat: add prometheus snmp and blackbox exporters #323
Workflow file for this run
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
# NOTE refs | |
# - https://github.blog/changelog/2020-04-15-github-actions-new-workflow-features/#new-fromjson-method-in-expressions | |
# - https://stackoverflow.com/questions/59977364/github-actions-how-use-strategy-matrix-with-script | |
name: sync | |
on: | |
pull_request: {} | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 0 * * MON" | |
workflow_dispatch: {} | |
permissions: | |
contents: read | |
id-token: write | |
packages: write | |
security-events: write | |
concurrency: | |
group: ${{ github.run_id }} | |
cancel-in-progress: false | |
jobs: | |
sync: | |
env: | |
ECR: 862640294325.dkr.ecr.ap-southeast-2.amazonaws.com | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | |
- uses: GeoNet/setup-crane@00c9e93efa4e1138c9a7a5c594acd6c75a2fbf0c # main | |
- uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v2.0.0 | |
with: | |
aws-region: ap-southeast-2 | |
role-to-assume: arn:aws:iam::862640294325:role/github-actions-geonet-ecr-push | |
role-duration-seconds: 3600 | |
role-session-name: github-actions-GeoNet--base-images | |
if: github.ref_name == 'main' | |
- name: login to ECR | |
run: | | |
aws ecr get-login-password --region ap-southeast-2 | skopeo login "$ECR" -u AWS --password-stdin | |
if: github.ref_name == 'main' | |
- name: dry run copy to ghcr.io | |
env: | |
GH_TOKEN: ${{ secrets.GH_CI_USER_TOKEN }} | |
run: | | |
skopeo sync --dry-run --all --src yaml --dest docker sync-ghcr.yml ghcr.io/geonet/base-images | |
- name: copy to ghcr.io | |
env: | |
GH_TOKEN: ${{ secrets.GH_CI_USER_TOKEN }} | |
run: | | |
skopeo sync --all --keep-going --src yaml --dest docker sync-ghcr.yml ghcr.io/geonet/base-images | |
if: github.ref_name == 'main' | |
- name: copy to ecr | |
run: | | |
skopeo sync --all --src yaml --dest docker sync-ecr.yml ${{ env.ecr }} | |
if: github.ref_name == 'main' |