-
Notifications
You must be signed in to change notification settings - Fork 4
56 lines (48 loc) · 1.56 KB
/
staging.yaml
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
56
name: Image Build
on:
push:
env:
DOCKER_IMAGE: quay.io/wire/outlook-addin
jobs:
publish:
name: Build and Push to Quay
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set environment variables
run: |
echo "BRANCH_NAME=$(git branch --show-current)" >> $GITHUB_ENV
echo "COMMIT_MESSAGE=$(git log --format=%B -n 1 ${{github.event.after}} | head -n 1)" >> $GITHUB_ENV
- name: Print environment variables
env:
GITHUB_CONTEXT: ${{toJson(github)}}
run: |
echo -e "BRANCH_NAME = ${BRANCH_NAME}"
echo -e "COMMIT_MESSAGE = ${COMMIT_MESSAGE}"
echo -e "GITHUB_CONTEXT = ${GITHUB_CONTEXT}"
- name: Create tags and labels
id: docker_meta
uses: docker/metadata-action@v3
with:
images: ${{ env.DOCKER_IMAGE }}
tags: |
type=sha,format=long
type=ref,event=tag
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to quay.io
uses: docker/login-action@v1
with:
registry: ${{ env.DOCKER_IMAGE }}
username: wire+outlook_addin_github_actions
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
push: true