-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (54 loc) · 1.72 KB
/
release.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
50
51
52
53
54
55
56
57
58
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Release Container
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 11
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Scaleway Container Registry
uses: docker/[email protected]
with:
registry: rg.nl-ams.scw.cloud/cloud-skadi
username: nologin
password: ${{ secrets.SCALEWAY_TOKEN }}
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Docker meta
id: meta
uses: crazy-max/[email protected]
with:
images: |
rg.nl-ams.scw.cloud/cloud-skadi/gist-server
${{ secrets.DOCKER_HUB_USERNAME }}/gist-server
tags: |
type=semver,pattern={{version}}
- name: Build with Gradle
run: ./gradlew :server:installDist --no-daemon
- name: build docker images
uses: docker/[email protected]
with:
context: server
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
build-args: release=${{ steps.vars.outputs.tag }}