Bump peter-evans/dockerhub-description from 4.0.0 to 5.0.0 #42
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 Docker images | |
on: pull_request | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: [2.4] | |
distro: [alpine] | |
env: | |
repo: "govpf/apache-consul" # Please don't forget to create the repo on Docker Hub | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Compute tags | |
env: | |
repo: ${{ env.repo }} | |
version: ${{ matrix.version }} | |
distro: ${{ matrix.distro }} | |
run: | | |
TAGS="${repo}:${version}-${distro}" | |
echo 'docker_tags<<EOF' >> $GITHUB_ENV | |
echo "$TAGS" >> $GITHUB_ENV | |
echo 'EOF' >> $GITHUB_ENV | |
- name: Build and push | |
uses: docker/build-push-action@v6.1.0 | |
with: | |
context: . | |
file: ./${{ matrix.version }}/${{ matrix.distro }}/Dockerfile | |
platforms: linux/amd64 | |
pull: true | |
push: false | |
tags: ${{ env.docker_tags }} |