-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathastarte-e2e-build-workflow.yaml
More file actions
35 lines (32 loc) · 1.27 KB
/
astarte-e2e-build-workflow.yaml
File metadata and controls
35 lines (32 loc) · 1.27 KB
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
name: Astarte end-to-end build
on:
workflow_call:
env:
elixir_version: "1.15"
otp_version: "26.1"
jobs:
end-to-end-build:
name: End-to-end build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Build branch slug env variable (job-scoped)
run: |
# Slugify branch/tag name for Docker tag safety and consistency
echo "BRANCH_SLUG=$(echo "${GITHUB_REF_NAME}" | sha1sum | cut -f 1 -d ' ')" >> $GITHUB_ENV
- name: Build Astarte E2E
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
file: tools/astarte_e2e/Dockerfile
tags: astarte-e2e
outputs: type=docker,dest=${{ runner.temp }}/astarte-e2e.tar
build-args: BUILD_ENV=dev
cache-from: type=gha,scope=astarte_e2e-${{ env.BRANCH_SLUG }}
cache-to: type=gha,mode=max,scope=astarte_e2e-${{ env.BRANCH_SLUG }}
- name: Upload artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: astarte-e2e-image
path: ${{ runner.temp }}/astarte-e2e.tar