Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add shell command #10

Open
wants to merge 3 commits into
base: karsajobs-ui
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: 2.1

jobs:
lint-dockerfile:
docker:
- image: docker:stable
steps:
- checkout
- setup_remote_docker
- run:
name: Run hadolint
command: docker run --rm --interactive hadolint/hadolint < Dockerfile
build-app-karsajobs-ui:
docker:
- image: docker:stable
steps:
- checkout
- setup_remote_docker
- run:
name: Publish Docker Image
command: |
docker build -t karsajobs-ui .
docker tag karsajobs-ui ghcr.io/rickybeatus/karsajobs-ui
echo $DOCKER_PASSWORD | docker login ghcr.io -u rickybeatus --password-stdin
docker push ghcr.io/rickybeatus/karsajobs-ui

workflows:
karsajobs-ui:
jobs:
- lint-dockerfile
- build-app-karsajobs-ui
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VUE_APP_BACKEND=http://<Node_IP>:<Node_Port>
VUE_APP_BACKEND=http://127.0.0.1:62927
13 changes: 13 additions & 0 deletions build_push_image_karsajobs_ui.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

# build Docker image dari berkas Dockerfile yang disediakan
docker build -t karsajobs-ui .

# Mengubah nama image agar sesuai dengan format Github Packages
docker tag karsajobs-ui ghcr.io/rickybeatus/karsajobs-ui

# Login ke Github Packages
echo $CR_PAT | docker login ghcr.io -u rickybeatus --password-stdin

# Mengunggah image ke Github Packages
docker push ghcr.io/rickybeatus/karsajobs-ui