File tree Expand file tree Collapse file tree 7 files changed +84
-1
lines changed
Expand file tree Collapse file tree 7 files changed +84
-1
lines changed Original file line number Diff line number Diff line change 1+ # Items that don't need to be in a Docker image.
2+ # Anything not used by the build system should go here.
3+ . *
4+ Dockerfile
5+ README.md
6+
7+ # Artifacts that will be built during image creation.
8+ # This should contain all files created during `npm run build`.
9+ node_modules
Original file line number Diff line number Diff line change 1+ name : Deploy
2+
3+ on :
4+ release :
5+ types : [prereleased, released]
6+
7+ concurrency :
8+ cancel-in-progress : false
9+
10+ env :
11+ ENVIRONMENT : ${{ github.event.action == 'prereleased' && 'staging' || 'production' }}
12+
13+ jobs :
14+ build-and-push :
15+ name : " Build and push docker image"
16+ runs-on : ubuntu-latest
17+ environment : ${{ env.ENVIRONMENT }}
18+ steps :
19+ - name : Print variables
20+ run : echo "${{ toJSON(vars)}}"
21+
22+ - name : Print env
23+ run : echo "${{ toJSON(env)}}"
24+
25+ - name : Print secrets
26+ run : echo "${{ toJSON(secrets)}}"
27+
28+ - name : Checkout repository
29+ uses : actions/checkout@v4
30+
31+ - name : Login to GitHub Container Registry
32+ uses : docker/login-action@v3
33+ with :
34+ registry : ghcr.io
35+ username : ${{ github.actor }}
36+ password : ${{ secrets.GITHUB_TOKEN }}
37+
38+ - name : Build docker image (environment)
39+ run : |
40+ docker build -t ghcr.io/killmenot/github-test-${{ env.ENVIRONMENT }}:${{ github.event.release.tag_name }} -f Dockerfile .
41+
42+ - name : Push docker image to GitHub Container Registry (environment)
43+ run : |
44+ docker push ghcr.io/killmenot/github-test-${{ env.ENVIRONMENT }}:${{ github.event.release.tag_name }}
45+
46+ - name : Push docker image to GitHub Container Registry (production > staging)
47+ if : env.ENVIRONMENT == 'production'
48+ run : |
49+ docker push ghcr.io/killmenot/github-test-staging:${{ github.event.release.tag_name }}
50+
51+
52+
53+
Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on : [push, pull_request, release]
4+
5+ jobs :
6+ test :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - name : Print github context
10+ run : echo '${{ toJSON(github) }}'
Original file line number Diff line number Diff line change 1+ FROM nginx:1.25.4-alpine
2+
3+ COPY /static /usr/share/nginx/html
4+ RUN chown nginx.nginx /usr/share/nginx/html/ -R
5+
6+ EXPOSE 80
Original file line number Diff line number Diff line change @@ -16,3 +16,6 @@ meet you and you may call me V.
1616- feature2
1717- hotfix1
1818- feature3
19+ - feature4
20+ - feature5
21+ - feature6
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ const test = (r) => r.test.bind(r);
33module . exports = {
44 defaultIgnores : false ,
55 extends : [ '@commitlint/config-conventional' ] ,
6- ignores : [ test ( / M e r g e b r a n c h ( .* ?) ( i n | i n t o ) ( .* ) / ) ] ,
6+ ignores : [ test ( / M e r g e b r a n c h ( .* ?) / ) , test ( / M e r g e b r a n c h ( . * ? ) ( i n | i n t o ) ( .* ) / ) ] ,
77} ;
Original file line number Diff line number Diff line change 1+ < h1 > Hello World</ h1 >
2+ h1>
You can’t perform that action at this time.
0 commit comments