File tree Expand file tree Collapse file tree 2 files changed +30
-10
lines changed Expand file tree Collapse file tree 2 files changed +30
-10
lines changed Original file line number Diff line number Diff line change 1
- name : GitHub Actions Demo
2
- run-name : ${{ github.actor }} is testing out GitHub Actions 🚀
1
+ name : Docker Container Build
2
+ run-name : ${{ github.actor }} triggered docker build
3
3
on : [push]
4
4
jobs :
5
- Explore-GitHub-Actions :
5
+ docker-build :
6
6
runs-on : ubuntu-latest
7
7
steps :
8
- - run : echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
9
- - run : echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
10
- - run : echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
11
- - name : Check out repository code
8
+ - name : Checkout
12
9
uses : actions/checkout@v4
13
- - run : echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
14
- - run : echo "🖥️ The workflow is now ready to test your code on the runner."
10
+
11
+ - name : Set up Docker Buildx
12
+ uses : docker/setup-buildx-action@v3
13
+
14
+ - name : Build and Save Docker Image
15
+ uses : docker/build-push-action@v5
16
+ with :
17
+ context : .
18
+ file : Dockerfile
19
+ push : false
20
+ tags : my-image:latest
21
+
15
22
- name : List files in the repository
16
23
run : |
17
24
ls ${{ github.workspace }}
18
- - run : echo "🍏 This job's status is ${{ job.status }}."
25
+ docker images -a
26
+
27
+ - run : echo "Job's status is ${{ job.status }}."
28
+
19
29
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:18.04
2
+
3
+ RUN apt-get update && \
4
+ apt-get install -y redis-server && \
5
+ apt-get clean
6
+
7
+ EXPOSE 6379
8
+
9
+ CMD ["redis-server" , "--protected-mode no" ]
10
+
You can’t perform that action at this time.
0 commit comments