-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 1.01 KB
/
build.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
name: Bus
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Extract Tag version
id: tag_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Checkout
uses: actions/checkout@v4
- name: Prepare the credentials
run: |
echo "ELLA_ACCESS_TOKEN=${{ secrets.ELLA_ACCESS_TOKEN }}" > .github/credentials/.env
- name: build
run: |
GIT_COMMIT=$(git rev-list -1 HEAD)
VERSION=${{ steps.tag_version.outputs.VERSION }}
docker build \
--build-arg GIT_COMMIT=$GIT_COMMIT \
--build-arg VERSION=$VERSION \
--no-cache \
--progress=plain \
--secret id=_env,src=.github/credentials/.env \
-t ellato/bus:$VERSION -t ellato/bus:latest .
echo ${{ secrets.ELLA_DOCKER_TOKEN }} | docker login -u ellato --password-stdin
docker push ellato/bus:$VERSION
docker push ellato/bus:latest