Skip to content

Certificate Authority Web Server #46710

Certificate Authority Web Server

Certificate Authority Web Server #46710

Workflow file for this run

name: Certificate Authority Web Server
permissions:
contents: write
on:
workflow_dispatch:
#[workflow_call]
schedule:
- cron: '* * * * */1'
#- cron: '* * 1 * *'
#- cron: '*/1 * * * *'
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: build package
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
#with:
# path: "repo"
## TODO new image
#- name: Configure GPG Key
# run: |
# echo -n "$GPG_SIGNING_KEY" | gpg --import
# #echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
# env:
# GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
#- name: Sign Installation Package
# working-directory: ${{ github.workspace }}/dist
# run: |
# find . -mindepth 1 -exec gpg --yes --detach-sig '{}' \;
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# TODO new image
- name: Authenticate with Docker Hub
run: |
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build Docker Image
run: |
docker build -t "innovanon/teamhack_web:$TEAMHACK_VERSION" .
env:
TEAMHACK_VERSION: ${{ steps.tag_version.outputs.new_tag }}
- name: Tag Docker Image
run: |
docker tag "innovanon/teamhack_web:$TEAMHACK_VERSION" \
innovanon/teamhack_web:latest
env:
TEAMHACK_VERSION: ${{ steps.tag_version.outputs.new_tag }}
- name: Deploy Docker Image
run: |
docker push innovanon/teamhack_web
# TODO new image
- name: Configure GPG Key
run: |
echo -n "$GPG_SIGNING_KEY" | gpg --import
#echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
- name: Sign Installation Package
run: |
gpg --yes --detach-sig Dockerfile
gpg --yes --detach-sig docker-compose.yaml
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
fail_on_unmatched_files: true
generate_release_notes: true
files: |
*