Skip to content

Updated workflow

Updated workflow #33

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches: [ 'main' ]
paths: ['source-code/**']
pull_request:
branches: [ 'main' ]
paths: ['source-code/**']
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: docker login
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
- name: Build the Docker image
working-directory: ./source-code
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: docker build . -f Dockerfile -t $DOCKERHUB_USERNAME/node-argo-k8s:${GITHUB_SHA::7}
- name: Push the Docker image
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: docker push $DOCKERHUB_USERNAME/node-argo-k8s:${GITHUB_SHA::7}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Update values.yaml
env:
GIT_TOKEN: ${{ secrets.TOKEN }}
GIT_SHA: ${GITHUB_SHA::7}
run: |
pip install -r requirements.txt
ls -la
pwd
python update-values.py