Skip to content

Bump actions/checkout from 3 to 4 #264

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #264

Workflow file for this run

name: ftl-build builds
on:
pull_request:
paths:
- 'ftl-build/**'
- '.github/workflows/ftl-build.yml'
push:
tags:
- "**"
paths:
- 'ftl-build/**'
- '.github/workflows/ftl-build.yml'
workflow_dispatch:
schedule:
# 1:30am UTC every Sunday, has no particular significance
- cron: "30 1 * * 0"
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ARCH: [aarch64, armv4t, armv5te, armv6hf, armv7hf, armv8a, x86_32, x86_64, x86_64-musl, riscv64]
steps:
-
name: Checkout Repo
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ secrets.DOCKERHUB_NAMESPACE }}/ftl-build,enable=${{ github.event_name != 'pull_request' }}
ghcr.io/${{ github.repository_owner }}/ftl-build,enable=${{ github.event_name != 'pull_request' }}
foo/bar,enable=${{ github.event_name == 'pull_request' }}
flavor: |
latest=false
tags: |
type=ref,event=tag,suffix=-${{ matrix.ARCH }}
type=ref,event=branch,suffix=-${{ matrix.ARCH }},enable=${{ github.event_name != 'schedule' }}
type=ref,event=pr,suffix=-${{ matrix.ARCH }}
type=raw,value=${{matrix.ARCH}},enable=${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'schedule' }}
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}
-
name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build
uses: docker/build-push-action@v4
with:
context: ftl-build/${{ matrix.ARCH }}/.
push: false
target: tester
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Caching disabled for now...
# cache-from: type=gha,scope=${{ matrix.ARCH }}
# cache-to: type=gha,scope=${{ matrix.ARCH }},mode=max
-
name: Build (all-in)
if: matrix.ARCH == 'x86_64'
uses: docker/build-push-action@v4
with:
context: ftl-build/${{ matrix.ARCH }}/.
push: false
target: tester-all-in
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-
name: Push
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v4
with:
context: ftl-build/${{ matrix.ARCH }}/.
push: true
target: builder
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Caching disabled for now...
# cache-from: type=gha,scope=${{ matrix.ARCH }}
# cache-to: type=gha,scope=${{ matrix.ARCH }},mode=max