Bump attrs from 25.3.0 to 25.4.0 #281
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: docker | |
| on: | |
| push: | |
| branches: | |
| pull_request: | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set some variables | |
| id: vars | |
| run: | | |
| short_sha=$(git rev-parse --short HEAD) | |
| image="jupyter/nbviewer:$short_sha" | |
| echo "image=$image" >> $GITHUB_OUTPUT | |
| tags="$image" | |
| if "${{ github.ref_name }}" == "main" ]]; then | |
| tags="jupyter/nbviewer:latest $tags" | |
| fi | |
| echo "tags=$tags" >> $GITHUB_OUTPUT | |
| - name: Check outputs | |
| run: echo ${{ steps.vars.outputs.sha_short }} | |
| - name: Login to docker hub | |
| if: github.ref_name == 'main' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build | |
| uses: docker/build-push-action@v3 | |
| with: | |
| push: false | |
| load: true | |
| context: . | |
| platforms: linux/amd64 | |
| tags: ${{ steps.vars.outputs.tags }} | |
| - name: Test | |
| run: | | |
| docker run --rm -i ${{ steps.vars.outputs.image }} python3 -c "import nbviewer, pycurl, pylibmc" | |
| docker run --rm -i ${{ steps.vars.outputs.image }} python3 -m nbviewer --help-all | |
| - name: Push | |
| if: github.ref_name == 'main' | |
| uses: docker/build-push-action@v3 | |
| with: | |
| context: . | |
| platforms: linux/amd64 | |
| push: ${{ github.ref_name == 'main' }} | |
| tags: ${{ steps.vars.outputs.tags }} |