-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (40 loc) · 1.25 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
38
39
40
41
42
43
44
45
46
47
48
49
name: Publish Docker image
on:
push:
tags:
- '*'
env:
MM_NOTIFICATION_CHANNEL: bots
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@v4
- name: 🏷️ Get Tag
id: version
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: 🐍 Build python package
run: python setup.py sdist
- name: 📦 Upload python package to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/affiliation-matcher-${{ steps.version.outputs.tag }}.tar.gz
tag: ${{ github.ref }}
- name: 🔑 Docker login
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
- name: 🐋 Build docker image
run: make docker-build
- name: 📦 Push docker image
run: make docker-push
notify:
needs: build
if: always()
runs-on: ubuntu-latest
steps:
- uses: dataesr/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN}}
mattermost_webhook_url: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
mattermost_channel: ${{ env.MM_NOTIFICATION_CHANNEL}}