Skip to content

action ec2 script add #2

action ec2 script add

action ec2 script add #2

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches: [ main ]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: jerneithe/category_service
- name: ec2 접속 및 애플리케이션 실행
uses : appleboy/ssh-action@v0.1.6
with :
host : ${{{ secrets.EC2_HOST }}

Check failure on line 31 in .github/workflows/action.yml

View workflow run for this annotation

GitHub Actions / Build and Push Docker Image

Invalid workflow file

The workflow is not valid. .github/workflows/action.yml (Line: 31, Col: 18): Unexpected symbol: '{'. Located at position 1 within expression: { secrets.EC2_HOST
username : ubuntu
key : ${{ secrets.EC2_PEMKEY }}
port : 22
script : |
sudo docker stop $(sudo docker ps -a -q)
sudo docker rm $(sudo docker ps -a -q)
sudo docker pull jerneithe/comment_service