Skip to content

Commit

Permalink
Merge pull request #11 from tls-attacker/Improve-CI
Browse files Browse the repository at this point in the history
Added report uploader build to CI
  • Loading branch information
mmaehren authored Jul 22, 2022
2 parents 59733b2 + ab82a06 commit 061026b
Showing 1 changed file with 38 additions and 3 deletions.
41 changes: 38 additions & 3 deletions .github/workflows/BuildPushDockerImage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#
# The docker images are only pushed for events on the public repository.

name: Build and push TLS-Anvil and ReportAnalyzer Docker images
name: Build & Push Docker images

on:
push:
Expand All @@ -27,7 +27,7 @@ env:

jobs:
tlsanvil:
name: TLS-Anvil Docker image
name: TLS-Anvil
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:


reportAnalyzer:
name: Report Analyzer Docker image
name: Report Analyzer
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -97,6 +97,41 @@ jobs:
tags: 'ghcr.io/tls-attacker/tlsanvil-reportanalyzer:${{ env.DOCKER_TAG }}'


uploader:
name: Report Uploader
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Determine tag
run: |
if [[ $IS_RELEASE == 'true' ]]; then
echo "DOCKER_TAG=$GITHUB_REF_NAME" >> $GITHUB_ENV
else
echo "DOCKER_TAG=latest" >> $GITHUB_ENV
fi
- name: Build and Push Docker image
uses: docker/build-push-action@v3
with:
context: ./Report-Analyzer/src/backend/uploader
push: ${{ fromJSON(env.SHOULD_PUSH) }}
tags: 'ghcr.io/tls-attacker/tlsanvil-result-uploader:${{ env.DOCKER_TAG }}'


createRelease:
name: Create release
runs-on: ubuntu-latest
Expand Down

0 comments on commit 061026b

Please sign in to comment.