File tree Expand file tree Collapse file tree 3 files changed +79
-0
lines changed Expand file tree Collapse file tree 3 files changed +79
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Test Docker
2+
3+ on :
4+ pull_request :
5+
6+ jobs :
7+ docker :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout
11+ uses : actions/checkout@v4
12+ - name : Docker meta
13+ id : meta
14+ uses : docker/metadata-action@v5
15+ with :
16+ images : pokeapi/graphiql
17+ - name : Set up QEMU
18+ uses : docker/setup-qemu-action@v3
19+ - name : Set up Docker Buildx
20+ id : buildx
21+ uses : docker/setup-buildx-action@v3
22+ - name : Build
23+ id : docker_build
24+ uses : docker/build-push-action@v6
25+ with :
26+ context : .
27+ file : ./Dockerfile
28+ push : false
29+ platforms : linux/amd64,linux/arm64
30+ tags : pokeapi/graphiql:local
31+ labels : ${{ steps.meta.outputs.labels }}
32+ - name : Image digest
33+ run : echo ${{ steps.docker_build.outputs.digest }}
Original file line number Diff line number Diff line change 1+ name : Push Docker image
2+
3+ on :
4+ push :
5+ branches :
6+ - ' master'
7+ - ' staging'
8+ tags :
9+ - ' *.*.*'
10+
11+ jobs :
12+ docker :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+ - name : Docker meta
18+ id : meta
19+ uses : docker/metadata-action@v5
20+ with :
21+ images : pokeapi/graphiql
22+ - name : Set up QEMU
23+ uses : docker/setup-qemu-action@v3
24+ - name : Set up Docker Buildx
25+ id : buildx
26+ uses : docker/setup-buildx-action@v3
27+ - name : Login to DockerHub
28+ if : github.event_name != 'pull_request'
29+ uses : docker/login-action@v3
30+ with :
31+ username : ${{ secrets.DOCKERHUB_USERNAME_NARAMSIM }}
32+ password : ${{ secrets.DOCKERHUB_TOKEN_NARAMSIM }}
33+ - name : Build and push
34+ id : docker_build
35+ uses : docker/build-push-action@v6
36+ with :
37+ context : .
38+ file : ./Dockerfile
39+ push : true
40+ platforms : linux/amd64,linux/arm64
41+ tags : ${{ steps.meta.outputs.tags }}
42+ labels : ${{ steps.meta.outputs.labels }}
43+ - name : Image digest
44+ run : echo ${{ steps.docker_build.outputs.digest }}
Original file line number Diff line number Diff line change 1+ FROM nginx:1.27.3-alpine
2+ COPY ./index.html /usr/share/nginx/html/
You can’t perform that action at this time.
0 commit comments