[gh-actions](deps): Bump actions/checkout from 4 to 5 #34
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 Linux buildenv image | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - .github/workflows/tools/containers/buildenv-git-annex/* | |
| - .github/workflows/build-linux-buildenv.yaml | |
| pull_request: | |
| paths: | |
| - .github/workflows/tools/containers/buildenv-git-annex/* | |
| - .github/workflows/build-linux-buildenv.yaml | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout this repository | |
| uses: actions/checkout@v5 | |
| - name: Build image | |
| working-directory: .github/workflows/tools/containers/buildenv-git-annex | |
| run: | | |
| set -eux | |
| release=$(sed -nE -e '/FROM/s,.*:(.*),\1,gp' Dockerfile) | |
| freeze_date=$(sed -nE '/nd_freeze/s,.* (20[0-9]*).*,\1,gp' Dockerfile) | |
| commit=$(git rev-parse --short=4 HEAD) | |
| docker build \ | |
| -t "datalad/buildenv-git-annex:latest" \ | |
| -t "datalad/buildenv-git-annex:${release}" \ | |
| -t "datalad/buildenv-git-annex:${release}-${freeze_date}-${commit}" \ | |
| . | |
| docker images | |
| - name: Push image | |
| if: github.ref_name == 'master' | |
| run: | | |
| # TODO: switch to some datalad bot account | |
| docker login -u jwodder --password-stdin <<<"$DOCKER_TOKEN" | |
| docker push --all-tags datalad/buildenv-git-annex | |
| env: | |
| DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} |