Skip to content

chore: bump action versions #55

chore: bump action versions

chore: bump action versions #55

Workflow file for this run

name: Build and push Docker images
on:
push:
paths:
- ".github/workflows/**"
branches:
- "main"
pull_request:
types:
- opened
- synchronize
jobs:
build-image:
name: Build and push fish image
runs-on: ubuntu-latest
strategy:
matrix:
version: [
{ fish: 3.0.2, alpine: 3.11 },
{ fish: 3.1.2, alpine: 3.13 },
{ fish: 3.2.2, alpine: 3.14 },
{ fish: 3.3.1, alpine: 3.15 },
{ fish: 3.4.1, alpine: 3.16 },
{ fish: 3.5.1, alpine: 3.17 },
{ fish: 3.6.1, alpine: 3.18 },
{ fish: 3.6.3, alpine: 3.19 },
{ fish: 3.7.0, alpine: "edge" },
# { fish: 3.6.1, alpine: "edge" }, # priorize latest alpine version
]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect latest item from matrix
run: |
echo "IS_LATEST_VERSION=$([ $(expr ${{ strategy.job-index }} + 1) = ${{ strategy.job-total }} ] && echo true)" >> "$GITHUB_ENV"
- name: Docker meta
id: meta
uses: docker/[email protected]
with:
# list of Docker images to use as base name for tags
images: |
purefish/docker-fish
# ghcr.io/pure-fish/docker-fish # need token
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}},value=${{matrix.version.fish}}
type=raw,value=latest,enable=$IS_LATEST_VERSION
flavor: |
latest=false
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build fish:${{ matrix.version.fish }} image
uses: docker/build-push-action@v5
with:
push: true
context: .
file: ./Dockerfile
build-contexts: |
alpine=docker-image://alpine:${{ matrix.version.alpine }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
- name: Test installed version match expected ${{ matrix.version.fish }}
run: |
docker run \
--rm \
purefish/docker-fish:${{ matrix.version.fish }} \
'fish --version | grep ${{ matrix.version.fish }}'