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: Github Actions for building and pushing docker | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# - uses: actions/checkout@v4 | |
# - name: Create file after checkout | |
# working-directory: ./backend | |
# run: | | |
# sed -i '/PORT=/c\PORT=${{ secrets.MONGO_PORT }}' .env | |
# sed -i '/MONGO_USER=/c\MONGO_USER=${{ secrets.MONGO_USER }}' .env | |
# sed -i '/MONGO_PASS=/c\MONGO_PASS=${{ secrets.MONGO_PASS }}' .env | |
# sed -i '/MONGO_API=/c\MONGO_API=${{ secrets.MONGO_API }}' .env | |
# - uses: docker/login-action@v3 | |
# with: | |
# username: ${{ secrets.DOCKERHUB_USERNAME }} | |
# password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# - uses: docker/build-push-action@v5 | |
# with: | |
# context: ./backend | |
# push: true | |
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/node-server:0.0.${{ github.run_number }}.RELEASE | |
# - name: Create file for Front-end | |
# working-directory: ./frontend | |
# run: | | |
# sed -i '/PORT=/c\PORT=${{ secrets.REACT_APP_PORT }}' .env | |
# - uses: docker/build-push-action@v5 | |
# with: | |
# context: ./frontend | |
# push: true | |
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/react-app:0.0.${{ github.run_number }}.RELEASE | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'famasboy888/CICD_ArgoCD_States' | |
path: 'MERN_helm-chart' | |
persist-credentials: true | |
- name: check files | |
shell: bash | |
working-directory: MERN_helm-chart | |
run: | | |
ls * | |
cat README.md | |