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 publish Docker
2+
3+ on :
4+ push :
5+ branches :
6+ - ' **'
7+ tags :
8+ - ' v*'
9+ workflow_dispatch :
10+ inputs :
11+ dry-run :
12+ description : ' Skip pushing built images'
13+ type : boolean
14+ default : true
15+ env :
16+ IMAGE_NAME : linode/apl-nodejs-helloworld
17+
18+ jobs :
19+ build :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Checkout code
23+ uses : actions/checkout@v6
24+
25+ - name : Set up Docker Buildx
26+ uses : docker/setup-buildx-action@v3
27+
28+ - name : Log in to Docker registry
29+ uses : docker/login-action@v3
30+ with :
31+ username : ${{ vars.DOCKER_USERNAME }}
32+ password : ${{ secrets.DOCKER_PASSWORD }}
33+
34+ - name : CI tests, image build and push tag for main or branch
35+ uses : docker/build-push-action@v6
36+ with :
37+ push : ${{ github.event_name == 'push' || !github.event.inputs.dry-run }}
38+ context : .
39+ tags : |
40+ ${{ env.IMAGE_NAME }}:${{ github.ref_name }}
You can’t perform that action at this time.
0 commit comments