Update cd.yml #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
push: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login to Dockerhub | |
env: | |
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} | |
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | |
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | |
- name: Decode and save certificate | |
env: | |
PFX_CERTIFICATE_BASE64: ${{ secrets.HIVESPHERE_CERTIFICATE }} | |
PFX_CERTIFICATE_PASSWORD: ${{ secrets.HIVESPHERE_CERTIFICATE_PASSWORD }} | |
run: echo "$PFX_CERTIFICATE_BASE64" | base64 --decode > certificate.pfx | |
- name: Save password | |
run: echo "$PFX_CERTIFICATE_PASSWORD" > certificate_password.txt | |
- name: Build Docker Image | |
run: docker build -t atleebugs/exam-registration-uoj -f ExamRegistrationUoJ/Dockerfile . | |
- name: Push to Dockerhub | |
run: docker push atleebugs/exam-registration-uoj:latest |