Update python Docker tag to v3.13.1 #302
This file contains 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 docker image | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
if: ${{ github.ref == 'refs/heads/master' }} | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Bump version and push tag | |
id: create_tag | |
uses: mathieudutour/github-tag-action@v6.2 | |
if: ${{ github.ref == 'refs/heads/master' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
create_annotated_tag: true | |
- name: Set docker tag | |
id: docker_tag | |
env: | |
NEW_TAG: ${{ steps.create_tag.outputs.new_tag }} | |
run: | | |
echo "::set-output name=DOCKER_TAG::$([ "$NEW_TAG" = "" ] && echo test || echo "$NEW_TAG")" | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
push: ${{ github.ref == 'refs/heads/master' }} | |
tags: "jonoh/rpi-docker-build:${{ steps.docker_tag.outputs.DOCKER_TAG }},jonoh/rpi-docker-build:latest" | |
- name: Update repo description | |
uses: peter-evans/dockerhub-description@v4 | |
if: ${{ github.ref == 'refs/heads/master' }} | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
repository: jonoh/rpi-docker-build |