feat(github-action)!: Update docker/login-action action to v4 #138
Workflow file for this run
This file contains hidden or 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: Build and Test | |
| "on": | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| paths-ignore: | |
| - '.github/**' | |
| - '.gitignore' | |
| - '**.md' | |
| permissions: write-all | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: chipwolf/badgesort | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | |
| - name: Build BadgeSort container | |
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | |
| with: | |
| context: . | |
| load: true | |
| tags: badgesort:test | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Run tests in container | |
| run: | | |
| docker run --rm badgesort:test sh -c ". \$VENV_PATH/bin/activate && pip install pytest pytest-cov && pytest tests/ -v --cov=badgesort --cov-report=term-missing" | |
| image: | |
| name: Build Image | |
| needs: [test] | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and cache Docker image | |
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | |
| with: | |
| context: . | |
| push: ${{ github.event_name == 'push' }} | |
| tags: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'latest' }}" | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| badgesort: | |
| name: Run BadgeSort | |
| needs: [image] | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Demo 1 | |
| uses: ./ | |
| with: | |
| format: markdown | |
| id: default | |
| output: README.md | |
| slugs: | | |
| osu | |
| github | |
| americanexpress | |
| nodered | |
| opensea | |
| sort: hilbert | |
| style: for-the-badge | |
| - name: Demo 2 | |
| uses: ./ | |
| with: | |
| format: html | |
| id: foobar | |
| output: README.md | |
| random: 5 | |
| sort: false | |
| style: flat-square | |
| - name: Demo 3 | |
| uses: ./ | |
| with: | |
| opts: | | |
| --hue-rotate 240 | |
| id: example | |
| format: html | |
| output: README.md | |
| sort: step_invert | |
| style: flat | |
| slugs: | | |
| angular,apollographql,brave,d3dotjs,docker | |
| git,githubactions,googlecloud,graphql,heroku | |
| html5,insomnia,mongodb,nestjs,nodedotjs | |
| npm,prettier,react,reactivex,redux | |
| rollupdotjs,sass,styledcomponents,typescript,webpack | |
| - name: Commit and push | |
| uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9 | |
| if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') | |
| with: | |
| default_author: github_actions | |
| message: 'chore(docs): refresh badgesort' |