Skip to content

Bump docker/setup-buildx-action from 2.8.0 to 3.0.0 #66

Bump docker/setup-buildx-action from 2.8.0 to 3.0.0

Bump docker/setup-buildx-action from 2.8.0 to 3.0.0 #66

Workflow file for this run

name: Build Docker images
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
#version: [latest, 10, 12, 14, 15, 16, 18]
#distro: [ buster, bullseye, alpine ]
version: [latest, 16, 18]
distro: [ alpine ]
env:
repo: "govpf/node"
steps:
- name: Checkout
uses: actions/checkout@v3.5.3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v2
with:
files: ${{ matrix.version }}/${{ matrix.distro }}/Dockerfile
- name: Compute tags
if: steps.check_files.outputs.files_exists == 'true'
env:
repo: ${{ env.repo }}
version: ${{ matrix.version }}
distro: ${{ matrix.distro }}
run: |
TAGS="${repo}:${version}-${distro}"
if [[ $distro == 'bullseye' ]]; then
TAGS+=",${repo}:${version}"
fi
echo 'docker_tags<<EOF' >> $GITHUB_ENV
echo "$TAGS" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Build and push
if: steps.check_files.outputs.files_exists == 'true'
uses: docker/build-push-action@v4.1.1
with:
context: .
file: ./${{ matrix.version }}/${{ matrix.distro }}/Dockerfile
platforms: linux/amd64
pull: true
push: false
tags: ${{ env.docker_tags }}