Skip to content

feat: set periods from 2024 until current year #17

feat: set periods from 2024 until current year

feat: set periods from 2024 until current year #17

Workflow file for this run

name: CI/CD Sapa Mitra Frontend
on:
push:
branches: ["main"]
pull_request:
types: ["closed"]
branches: ["main"]
jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.merged == true
name: Build Frontend
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Insecure Docker Repository
run: |
sudo truncate -s-2 /etc/docker/daemon.json
echo ", \"insecure-registries\": [\"${{ secrets.DOCKER_REGISTRY_URL }}\"]}" | sudo tee -a /etc/docker/daemon.json
sudo systemctl restart docker
- name: Docker Auth
run: docker login ${{ secrets.DOCKER_REGISTRY_URL }} --username=${{ secrets.DOCKER_REGISTRY_USERNAME }} --password=${{ secrets.DOCKER_REGISTRY_PASSWORD }}
- name: Build and Push Docker Image
run: |
docker build --no-cache -t sapa-mitra-frontend -f Dockerfile.production .
docker tag sapa-mitra-frontend ${{ secrets.DOCKER_REGISTRY_URL }}/${{ secrets.DOCKER_REGISTRY_USERNAME }}/sapa-mitra-frontend:latest
docker push ${{ secrets.DOCKER_REGISTRY_URL }}/${{ secrets.DOCKER_REGISTRY_USERNAME }}/sapa-mitra-frontend:latest