-
Notifications
You must be signed in to change notification settings - Fork 11
58 lines (51 loc) · 1.48 KB
/
publish.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
name: publish
on:
push:
branches:
- 'master'
jobs:
build:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
permissions:
packages: write
checks: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1
- name: Get faas-cli
run: curl -sLSf https://cli.openfaas.com | sudo sh
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get Repo Owner
id: get_repo_owner
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV
- name: Docker Login
run: >
echo ${{ secrets.GITHUB_TOKEN }} |
docker login ghcr.io --username
${{ env.REPO_OWNER }}
--password-stdin
- name: Publish multi-arch functions
run: >
OWNER="${{ env.REPO_OWNER }}"
TAG="latest"
SERVER="ghcr.io"
faas-cli publish
--extra-tag ${{ github.sha }}
--build-arg GO111MODULE=on
--platforms linux/arm/v7,linux/arm64,linux/amd64
- name: Publish amd64-only functions
run: >
OWNER="${{ env.REPO_OWNER }}"
TAG="latest"
SERVER="ghcr.io"
faas-cli publish
--extra-tag ${{ github.sha }}
--platforms linux/amd64
-f stack-amd64.yml