Skip to content

Commit

Permalink
Add latest_prerelease Docker Hub tag for following the latest alpha r…
Browse files Browse the repository at this point in the history
…elease (#3465)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
  • Loading branch information
matthewarmand and JelleZijlstra committed Dec 21, 2022
1 parent 29dd257 commit 3246df8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,16 @@ jobs:
push: true
tags: pyfound/black:latest_release

- name: Build and push latest_prerelease tag
if:
${{ github.event_name == 'release' && github.event.action == 'published' &&
github.event.release.prerelease }}
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: pyfound/black:latest_prerelease

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
<!-- For example, Docker, GitHub Actions, pre-commit, editors -->

- Move 3.11 CI to normal flow now all dependencies support 3.11 (#3446)
- Docker: Add new `latest_prerelease` tag automation to follow latest black alpha
release on docker images (#3465)

### Documentation

Expand Down
5 changes: 5 additions & 0 deletions docs/usage_and_configuration/black_docker_image.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ _Black_ images with the following tags are available:
- `latest_release` - tag created when a new version of _Black_ is released.\
ℹ Recommended for users who want to use released versions of _Black_. It maps to [the latest release](https://github.com/psf/black/releases/latest)
of _Black_.
- `latest_prerelease` - tag created when a new alpha (prerelease) version of _Black_ is
released.\
ℹ Recommended for users who want to preview or test alpha versions of _Black_. Note that
the most recent release may be newer than any prerelease, because no prereleases are created
before most releases.
- `latest` - tag used for the newest image of _Black_.\
ℹ Recommended for users who always want to use the latest version of _Black_, even before
it is released.
Expand Down

0 comments on commit 3246df8

Please sign in to comment.