-
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-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
- 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@d08e5c354a6adb9ed34480a06d141179aa583294 # v7
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@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: astarte-e2e-image
path: ${{ runner.temp }}/astarte-e2e.tar