File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Docker Image CI
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v3
13+
14+ - name : Get the git tag
15+ id : get_tag
16+ run : echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
17+
18+ - name : Build the Docker image
19+ run : docker build . --file Dockerfile --tag icomputerfreak/notifier-bot:${{ steps.get_tag.outputs.tag }}
20+
21+ - name : Log in to Docker Hub
22+ run : echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
23+
24+ - name : Tag the Docker image as latest
25+ run : docker tag icomputerfreak/notifier-bot:${{ steps.get_tag.outputs.tag }} icomputerfreak/notifier-bot:latest
26+
27+ - name : Push the Docker image to Docker Hub
28+ run : |
29+ docker push icomputerfreak/notifier-bot:${{ steps.get_tag.outputs.tag }}
30+ docker push icomputerfreak/notifier-bot:latest
You can’t perform that action at this time.
0 commit comments