-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (40 loc) · 1.24 KB
/
ci-satellites.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
name: GH-Actions-Satellites
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
satellites-build:
runs-on: ubuntu-latest
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
EARTHLY_ORG: ${{ secrets.EARTHLY_ORG }}
SATELLITE_NAME: ${{ secrets.SATELLITE_NAME }}
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
FORCE_COLOR: 1
EARTHLY_LOGSTREAM_UPLOAD: true
steps:
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.9
- uses: actions/checkout@v2
- name: Put back the git branch into git (Earthly uses it for tagging)
run: |
branch=""
if [ -n "$GITHUB_HEAD_REF" ]; then
branch="$GITHUB_HEAD_REF"
else
branch="${GITHUB_REF##*/}"
fi
git checkout -b "$branch" || true
- name: Docker Login
run: docker login --username "$DOCKERHUB_USERNAME" --password "$DOCKERHUB_TOKEN"
- name: Earthly version
run: earthly --version
- name: Run CI pipeline
run: "earthly --ci --sat $SATELLITE_NAME --org $EARTHLY_ORG --push +main"