-
Notifications
You must be signed in to change notification settings - Fork 3
68 lines (61 loc) · 2.13 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
59
60
61
62
63
64
65
66
67
68
name: Release docker image
on:
release:
types: [created]
jobs:
release:
runs-on: ubuntu-latest
permissions:
packages: write # required to publish docker image
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta-builder
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/georiviere-public-builder
- name: Build and push Docker image builder
uses: docker/build-push-action@v5
with:
context: .
file: ./.docker/Dockerfile
push: true
tags: ${{ steps.meta-builder.outputs.tags }}
labels: ${{ steps.meta-builder.outputs.labels }}
target: builder
attach_install_release:
runs-on: ubuntu-latest
needs: [ release ]
permissions:
contents: write # required to attach zip to release
if: ${{ github.event_name == 'release' && github.event.action == 'created' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Prepare install.zip
run: |
mkdir -p ./install/georiviere-public
cp .env.dist ./install/georiviere-public/.env
cp -r translations ./install/georiviere-public
cp -r src/customization ./install/georiviere-public
cp -r public/medias ./install/georiviere-public
cp ./install/docker-compose.yml ./install/georiviere-public
cp ./install/Dockerfile ./install/georiviere-public
cd install
zip -r ../install.zip ./georiviere-public
- name: Attach zip archive as release binary
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: 'install.zip'