-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (52 loc) · 1.9 KB
/
pull_request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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@v3
- 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@v2
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 }}