Skip to content

Added AMI cleanup tool #11

Added AMI cleanup tool

Added AMI cleanup tool #11

name: AMI cleanup tool CI
on:
pull_request:
branches:
- main
concurrency:
cancel-in-progress: true
group: "Only run one instance of AMI cleanup CI for PR #${{ github.event.number }}"
jobs:
check-if-should-run:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
should-verify-pr: ${{ steps.filter.outputs.changed }} # True if the AMI cleanup tool changed, false otherwise
steps:
- name: Filter out unrelated changes
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: filter
with:
filters: |
changed: "tools/ami-cleanup/**"
verify-pr:
runs-on: ubuntu-latest
needs:
- check-if-should-run
if: ${{ needs.check-if-should-run.outputs.should-verify-pr }}
steps:
- name: Checkout repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install Earthly
uses: earthly/actions-setup@be3fe0c1f84e9776b5a184d21bf7a4a779ea2e6b # v1.0.8
with:
# renovate: earthly-version
version: v0.7.23
- name: Lint Go code
working-directory: tools/ami-cleanup
run: earthly -ci +lint --OUTPUT_FORMAT=github-actions
- name: Run Go tests
working-directory: tools/ami-cleanup
run: earthly -ci +test --OUTPUT_FORMAT=github-actions