20
20
# goos: [linux, windows, darwin]
21
21
goarch : [amd64, arm64]
22
22
goos : [linux]
23
+ goarch : [amd64, arm64]
23
24
exclude :
24
25
- goarch : " 386"
25
26
goos : darwin
29
30
- name : checkout code
30
31
uses : actions/checkout@v2
31
32
- name : donwload schema
32
- run : curl -O https://schema.org/version/latest/schemaorg-current-https.jsonld
33
+ run : curl https://schema.org/version/latest/schemaorg-current-https.jsonld --output assets/schemaorg-current-https.jsonld
34
+ - name : donwload schema
35
+ run : curl https://schema.org/version/latest/schemaorg-current-http.jsonld --output assets/schemaorg-current-http.jsonld
36
+
33
37
# - name: Run tests
34
38
# run: go test -v -p=1 -timeout=0 ./...
35
39
- id : binary
@@ -49,30 +53,38 @@ jobs:
49
53
# - name: Checkout Repo
50
54
# uses: actions/checkout@v2
51
55
- name : Set up QEMU
52
- uses : docker/setup-qemu-action@v1
56
+ uses : docker/setup-qemu-action@v2
57
+ with :
58
+ platforms : ' arm64,arm'
53
59
- name : Set up Docker Buildx
54
60
uses : docker/setup-buildx-action@v1
55
61
- name : Login to DockerHub
56
- uses : docker/login-action@v1
62
+ uses : docker/login-action@v2
57
63
with :
58
64
username : ${{ secrets.DOCKERHUB_USERNAME }}
59
65
password : ${{ secrets.DOCKERHUB_TOKEN }}
66
+ - name : Set variables
67
+ run : |
68
+ VER=$(cat ./VERSION)
69
+ echo "VERSION=$VER" >> $GITHUB_ENV
60
70
- name : Extract metadata (tags, labels) for Docker
61
71
id : meta
62
72
uses : docker/metadata-action@v3
63
73
with :
64
74
images : nsfearthcube/gleaner
65
75
flavor : |
66
76
latest=true
77
+ suffix=-${{ env.VERSION }}
67
78
tags : |
68
79
type=ref,event=tag
69
80
type=ref,event=branch
70
81
type=semver,pattern={{version}}
71
82
- name : Build and push
72
83
id : docker_build
73
- uses : docker/build-push-action@v2
84
+ uses : docker/build-push-action@v3
74
85
with :
75
86
push : true
87
+ platforms : linux/amd64,linux/arm64
76
88
tags : ${{ steps.meta.outputs.tags }}
77
89
labels : ${{ steps.meta.outputs.labels }}
78
90
file : ./build/Dockerfile
0 commit comments