-
-
Notifications
You must be signed in to change notification settings - Fork 51
57 lines (55 loc) · 1.68 KB
/
create-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
# This workflow automates release creation and builds and deploys to DockerHub
name: Release project
on:
workflow_dispatch:
inputs:
release_notes:
description: 'Optional notes for the release'
required: false
type: string
jobs:
login:
runs-on: ubuntu-latest
steps:
-
name: Checkout new changes
uses: actions/checkout@v2
with:
java-version: 1.8
fetch-depth: 0
-
name: Get the latest tag in repository
id: TAG
run: |
echo "::set-output name=LATEST_VERSION::$(git tag | sort -Vr | head -n 1)"
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Publish release on GitHub
uses: softprops/action-gh-release@v1
with:
name: 'VulnerableApp-Facade-v${{ steps.TAG.outputs.LATEST_VERSION }}'
tag_name: '${{ steps.TAG.outputs.LATEST_VERSION }}'
body: '${{ inputs.release_notes }}'
-
name: Push docker images
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
push: true
platforms: linux/amd64,linux/arm64/v8
tags: |
sasanlabs/owasp-vulnerableapp-facade:latest
sasanlabs/owasp-vulnerableapp-facade:${{ steps.TAG.outputs.LATEST_VERSION }}