Skip to content

testing action

testing action #8

Workflow file for this run

name: ORDAPI DEPLOY CI
on:
push:
branches:
- 'ordapi*'
- 'opi*'
jobs:
build-and-push-cronjob:
runs-on: ubuntu-latest
env:
BRANCH_NAME: ${{ github.ref_name }}
IMAGE_NAME: crypticmetadev/ordapi:${{ github.ref_name }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: crypticmetadev # Static username
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_NAME }}:${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
build-args: |
MONGODB_URI=${{ secrets.MONGODB_URI }}
- name: Clean Docker system
run: docker system prune -af