Bump actions/cache from 2 to 4 #13
Workflow file for this run
This file contains 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: Validate pull request | |
on: | |
pull_request: | |
branches: [ 'master' ] | |
jobs: | |
buildx: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get release version | |
id: version_number | |
shell: bash | |
run: | | |
echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV | |
echo "::set-output name=RELEASE_VERSION::${GITHUB_REF:10}" | |
export BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | |
echo "BUILD_DATE=${BUILD_DATE}" >> $GITHUB_ENV | |
echo "::set-output name=BUILD_DATE::${BUILD_DATE}" | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@master | |
with: | |
install: true | |
- name: Builder info | |
run: | | |
echo "Name: ${{ steps.buildx.outputs.name }}" | |
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}" | |
echo "Status: ${{ steps.buildx.outputs.status }}" | |
echo "Flags: ${{ steps.buildx.outputs.flags }}" | |
echo "Platforms: ${{ steps.buildx.outputs.platforms }}" | |
- name: Cache Docker layers | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-single-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-single-buildx- | |
- name: Build Alpine | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: false | |
tags: | | |
boky/alpine-bootstrap:latest | |
boky/alpine-bootstrap:latest-alpine | |
platforms: "linux/amd64" # linux/s390x: "rsyslog (no such package)" | |
cache-from: type=local,src=/tmp/.buildx-cache/alpine | |
build-args: | | |
ALPINE_VERSION=alpine:latest | |
VCS_REF=${{ steps.version_number.outputs.RELEASE_VERSION }} | |
BUILD_DATE=${{ steps.version_number.outputs.BUILD_DATE }} |