-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (51 loc) · 1.66 KB
/
pipeline.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
57
58
59
60
name: Streamlit app CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build-push:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Check out code
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.PAT }} # `PAT` is a secret that contains your Personal Access Token with `write:packages` scope
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.10.0
- name: Build and push streamlit-app image
id: build-and-push
uses: docker/build-push-action@v4.2.1
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64/v8
push: true
tags: |
ghcr.io/youcefguichi/streamlit-app:${{github.sha}}
# shipping-artifact:
# runs-on: ubuntu-latest
# name: "Shipping artifact"
# needs: build-push
# if: github.ref_name == 'main'
# steps:
# - name: Check out
# uses: actions/checkout@v3.0.1
# with:
# fetch-depth: 1
# - name: Shipping release artifact to Gimlet
# id: shipping
# uses: gimlet-io/gimlet-artifact-shipper-action@v0.5.3
# env:
# GIMLET_SERVER: ${{ secrets.GIMLET_SERVER }}
# GIMLET_TOKEN: ${{ secrets.GIMLET_TOKEN }}
# - name: Artifact ID
# run: echo "Artifact ID is ${{ steps.shipping.outputs.artifact-id }}"