-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (68 loc) · 2.1 KB
/
deliver-application.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
69
70
71
name: Deliver Application
on:
push:
tags:
- 'v*.*.*'
workflow_run:
types:
- completed
workflows:
- Check Linter Errors
jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v')
strategy:
matrix:
node-version: [ 20.x ]
pnpm-version: [ 8.x ]
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- run: mkdir build
- run: mv src/ build
- name: Zip application
uses: vimtor/action-zip@v1.1
with:
dest: letsencrypt-acme-challenge-server-${{ github.ref_name }}.zip
files: build package.json package-lock.yaml
- name: Release application
uses: softprops/action-gh-release@v1
with:
body: Version ${{ github.ref_name }} of the application
body_path: ./CHANGELOG.md
files: |
letsencrypt-acme-challenge-server-${{ github.ref_name }}.zip
fail_on_unmatched_files: true
generate_release_notes: true
draft: false
prerelease: false
push-docker-image:
name: Push Docker Image
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v')
strategy:
matrix:
docker-repository: [ juansecu/letsencrypt-acme-challenge-server ]
platforms:
- linux/amd64
- linux/arm64
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Log in to registry
uses: docker/login-action@v3
with:
password: ${{ secrets.DOCKERHUB_TOKEN }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
- name: Build and push the Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: ${{ matrix.platforms }}
push: true
tags: ${{ matrix.docker-repository }}:${{ github.ref_name }},${{ matrix.docker-repository }}:latest