forked from Profirator/api-umbrella
-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (40 loc) · 1.55 KB
/
Copy pathrelease.yml
File metadata and controls
55 lines (40 loc) · 1.55 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Release
on:
push:
branches:
- master
env:
BASE_IMAGE_NAME: fiware/api-umbrella-base
IMAGE_NAME: fiware/api-umbrella
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set version output
id: out
run: echo "::set-output name=version::$(echo 0.18.1)"
- name: generate temporary tag
run: echo IMAGE_TAG=${{ steps.out.outputs.version }} >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Log into registry
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push base
run: |
docker build -f Dockerfile-base -t ${{ env.BASE_IMAGE_NAME }}:${{ env.IMAGE_TAG }} .
docker push ${{ env.BASE_IMAGE_NAME }}:${{ env.IMAGE_TAG }}
- name: Build and push release
run: |
docker build -f Dockerfile-build-from-base -t ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} --build-arg BASE_IMAGE=${{ env.BASE_IMAGE_NAME }}:${{ env.IMAGE_TAG }} .
docker push ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ steps.out.outputs.version }}
prerelease: false
title: ${{ steps.out.outputs.version }}
files: |
LICENSE.txt