Skip to content

Update actions/upload-artifact action to v4.4.1 #242

Update actions/upload-artifact action to v4.4.1

Update actions/upload-artifact action to v4.4.1 #242

Workflow file for this run

name: Test
on:
pull_request:
push:
branches:
- main
concurrency:
# Terminate all previous runs of the same workflow for pull requests
group: test-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
builder:
- autoconf
- meson
name: Test ${{ matrix.builder }}
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Build Dockerfile
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
with:
context: .
load: true
push: false
tags: buildfarm-client:alpine
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
repository: postgres/postgres
path: source
- id: postgres
run: echo "commit=$(git -C source rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: restore-cache
with:
path: build
key: test-alpine-${{ matrix.builder }}-${{ steps.postgres.outputs.commit }}
restore-keys: test-alpine-${{ matrix.builder }}-
- name: Test ${{ matrix.builder }}.conf
run: |
mkdir -p build
docker run --rm \
-v ./build:/mnt/build \
-v ./source:/mnt/source \
-u "$(id -u):$(id -g)" \
buildfarm-client:alpine \
--test \
--config ${{ matrix.builder }}.conf
- uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
if: always()
with:
name: ${{ matrix.builder }}-logs
path: build/**/*.log
if-no-files-found: error
- uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
if: github.ref == 'refs/heads/main'
with:
path: build
key: test-alpine-${{ matrix.builder }}-${{ steps.postgres.outputs.commit }}