forked from atomicdata-dev/atomic-server
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (36 loc) · 1.44 KB
/
main.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
on: [push, workflow_dispatch]
name: "Main pipeline: build, lint, test, docker"
jobs:
earthly:
name: Earthly
runs-on: ubuntu-latest
env:
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
steps:
- uses: earthly/actions-setup@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version: "latest"
- uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: joepmeneer
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: joepmeneer/atomic-server
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Earthly build, test
run: earthly --org ontola --ci --sat henk -P +pipeline
# - name: Convert newline-separated list to space-separated
# id: format_tags
# run: |
# SPACE_SEPARATED_TAGS=$(echo "${{ steps.meta.outputs.tags }}" | tr '\n' ' ')
# echo "steps.meta.output.tags=${{ steps.meta.outputs.tags }}"
# echo "SPACE_SEPARATED_TAGS=$SPACE_SEPARATED_TAGS" >> $GITHUB_ENV
# echo "Space-separated tags: $SPACE_SEPARATED_TAGS"
- name: Earthly build and push docker
run: earthly --org ontola --ci --sat henk -P --push +docker-all --tags="${{ steps.meta.outputs.tags }}"