Skip to content

Commit

Permalink
test deployed image from workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mmiglioranza22 committed Aug 31, 2024
1 parent 78ea518 commit b19aec8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/part3-express-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,17 @@ jobs:
file: part3/express-app/Dockerfile
push: true
tags: mmiglioranza22/express-app:latest

deploy-to-render:
name: Publish image to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Render Deployment
uses: sws2apps/[email protected]
# condition to test it works, commit message #skip does not trigger deploy
if: ${{ github.event_name == 'push' && !contains(toJson(github.event.commits.*.message), '#skip')}}
with:
serviceId: ${{ secrets.RENDER_SERVICE_ID }}
apiKey: ${{ secrets.RENDER_API_KEY }}
multipleDeployment: false
3 changes: 3 additions & 0 deletions part3/express-app/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## express app

Access with browser http://localhost:8080

[DockerHub link](https://hub.docker.com/r/mmiglioranza22/express-app)
[Render deployed link](https://helsinki-devops-with-docker-2024.onrender.com/)
File renamed without changes.
6 changes: 5 additions & 1 deletion part3/express-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ const app = express();

app.get("/", (req, res) => {
res.send(
"<h1>Hello World! version 3 pulled directly by Watchtower, third attempt!</h1>"
`<div>
<h1>Hello World!</h1>
<h2>repo image pulled directly by Watchtower works!. ex. 3.1</h2>
<h2>Testing auto deploy from docker image in repo to Render... ex. 3.2</h2>
</div>`
);
});

Expand Down

0 comments on commit b19aec8

Please sign in to comment.