From a31aabb7854c4b49874b7ec062710048b7b0b821 Mon Sep 17 00:00:00 2001 From: bwmac Date: Thu, 30 May 2024 10:35:21 -0600 Subject: [PATCH 1/2] updates CI --- .github/workflows/dev.yml | 61 ++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 84521d5c..7f4cc194 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -18,9 +18,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - with: {fetch-depth: 0} # deep clone for setuptools-scm + with: { fetch-depth: 0 } # deep clone for setuptools-scm - uses: actions/setup-python@v4 - with: {python-version: "3.9"} + with: { python-version: "3.9" } - name: Run static analysis and format checkers run: pipx run pre-commit run --all-files --show-diff-on-failure test: @@ -72,33 +72,34 @@ jobs: ghcr-publish: needs: [build, test] + if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - id: meta - uses: docker/metadata-action@v4 - with: - images: | - ghcr.io/${{ github.repository }} - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=ref,event=branch - type=sha - latest - - name: Publish Docker Image - uses: docker/build-push-action@v3 - with: - context: . - build-args: | - TARBALL_PATH=${{ needs.prepare.outputs.tarball-path }} - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + - uses: actions/checkout@v3 + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - id: meta + uses: docker/metadata-action@v4 + with: + images: | + ghcr.io/${{ github.repository }} + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=ref,event=branch + type=sha + latest + - name: Publish Docker Image + uses: docker/build-push-action@v3 + with: + context: . + build-args: | + TARBALL_PATH=${{ needs.prepare.outputs.tarball-path }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From bb70d90021ca3ee29540cd2299e38ec745af8d4e Mon Sep 17 00:00:00 2001 From: bwmac Date: Thu, 30 May 2024 11:12:53 -0600 Subject: [PATCH 2/2] bumps action versions --- .github/workflows/dev.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 7f4cc194..3d356d4e 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -17,9 +17,9 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: { fetch-depth: 0 } # deep clone for setuptools-scm - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: { python-version: "3.9" } - name: Run static analysis and format checkers run: pipx run pre-commit run --all-files --show-diff-on-failure @@ -35,9 +35,9 @@ jobs: # - "3.10" # - "3.11" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -49,7 +49,7 @@ jobs: run: | pytest tests/ --cov=agoradatatools --cov-report=html - name: Upload pytest test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pytest-results-${{ matrix.python-version }} path: htmlcov @@ -62,8 +62,8 @@ jobs: name: test data processing runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: "3.9" - run: pip install -U setuptools @@ -75,15 +75,15 @@ jobs: if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ghcr.io/${{ github.repository }} @@ -95,7 +95,7 @@ jobs: type=sha latest - name: Publish Docker Image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: context: . build-args: |