Skip to content

Commit

Permalink
SocialPulse: workflows: Push to dockerhub
Browse files Browse the repository at this point in the history
push to dockerhub after successful testing

Change-Id: Ia88b6fa4a58e5883194c2d0c3d9f6eb3cfa0912b
  • Loading branch information
resist15 committed Aug 30, 2024
1 parent 9575262 commit f91d53d
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,44 @@ jobs:
steps:
- name: Fetch Github Repository
uses: actions/checkout@v2

- name: Installing Python 3.12
uses: actions/setup-python@v2
with:
python-version: "3.12"

- name: Updating Pip to latest version
run: python -m pip install --upgrade pip

- name: Installing Dependencies
run: pip install -r requirements.txt

- name: Init Testing
run: |
pip install pytest
pytest
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

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

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/socialpulse:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit f91d53d

Please sign in to comment.