From d98e82da2fc6a2359e1c7d5094c79901417e11b6 Mon Sep 17 00:00:00 2001 From: Ross Ceballo Date: Tue, 13 Aug 2024 01:48:00 +0000 Subject: [PATCH] Fix yaml linting --- .github/workflows/build.yaml | 5 ++++- .github/workflows/markdownlint.yaml | 9 ++------- .github/workflows/shellcheck.yaml | 18 ------------------ .github/workflows/yamllint.yaml | 20 ++------------------ 4 files changed, 8 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/shellcheck.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f65f60d..f1ef40f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,3 +1,4 @@ +--- name: Build Jenkins swarm client container on: push: @@ -24,7 +25,9 @@ jobs: images: ghcr.io/${{ github.repository }} tags: | type=raw,value=latest,enable=${{ github.ref_name == 'master' }} - type=raw,value=merge,enable=${{ github.ref_name != 'master' }} + type=ref,event=branch + type=ref,event=tag + type=ref,event=pr,suffix=/${{ github.head_ref }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/.github/workflows/markdownlint.yaml b/.github/workflows/markdownlint.yaml index a701171..e6685c0 100644 --- a/.github/workflows/markdownlint.yaml +++ b/.github/workflows/markdownlint.yaml @@ -8,10 +8,5 @@ on: pull_request: jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v4 - - name: Run linter - uses: actionshub/markdownlint@main + call-workflow: + uses: lsst/rubin_workflows/.github/workflows/markdownlint.yaml@main diff --git a/.github/workflows/shellcheck.yaml b/.github/workflows/shellcheck.yaml deleted file mode 100644 index eb011bd..0000000 --- a/.github/workflows/shellcheck.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: shellcheck - -on: - push: - branches: - - main - pull_request: - -jobs: - shellcheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Run shellcheck - uses: ludeeus/action-shellcheck@master - # See https://github.com/ludeeus/action-shellcheck for customizations diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml index cb17767..757dbd8 100644 --- a/.github/workflows/yamllint.yaml +++ b/.github/workflows/yamllint.yaml @@ -2,24 +2,8 @@ name: Lint YAML Files on: - push: - branches: - - main pull_request: jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: 3.12 - - - name: Install - run: pip install yamllint - - - name: Run linter - run: yamllint . + call-workflow: + uses: lsst/rubin_workflows/.github/workflows/yamllint.yaml@main