File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : build-and-push
2+
3+ on :
4+ push :
5+ branches :
6+ - ' master'
7+ workflow_dispatch :
8+
9+ jobs :
10+ docker :
11+ runs-on : ubuntu-latest
12+ steps :
13+ -
14+ name : Set up QEMU
15+ uses : docker/setup-qemu-action@v2
16+ -
17+ name : Set up Docker Buildx
18+ uses : docker/setup-buildx-action@v2
19+ -
20+ name : Checkout code
21+ uses : actions/checkout@v4
22+ -
23+ name : Read version
24+ id : get_version
25+ run : |
26+ VERSION=$(cat VERSION | tr -d '\n')
27+ echo "version=$VERSION" >> $GITHUB_OUTPUT
28+ -
29+ name : Login to DockerHub
30+ uses : docker/login-action@v2
31+ with :
32+ username : ${{ secrets.DOCKER_USERNAME }}
33+ password : ${{ secrets.DOCKER_PASSWORD }}
34+ -
35+ name : Build and push
36+ uses : docker/build-push-action@v3
37+ with :
38+ context : .
39+ push : true
40+ tags : |
41+ ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}
42+ ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ steps.get_version.outputs.version }}
You can’t perform that action at this time.
0 commit comments