File tree Expand file tree Collapse file tree 3 files changed +57
-22
lines changed Expand file tree Collapse file tree 3 files changed +57
-22
lines changed Original file line number Diff line number Diff line change 96
96
project-demo/build/artifacts/release/MyApp.out
97
97
ceedling-0.32.0-d76db35.gem
98
98
LICENSE
99
-
100
- # - name: Git Config
101
- # uses: zmynx/github-actions/.github/actions/git/git-config@feature/gha
102
- #
103
- # - name: Git Tag
104
- # uses: zmynx/github-actions/.github/actions/git/git-tag@feature/gha
105
- # with:
106
- # tag: "${{ format('{0}{1}', 'v', steps.new_tag.outputs.new_tag) }}"
107
- #
108
- # - name: Publish image to DockerHub
109
- # uses: docker/build-push-action@v5.1.0
110
- # with:
111
- # context: .
112
- # file: Dockerfile.ubuntu
113
- # platforms: linux/amd64
114
- # push: true
115
- # tags: |
116
- # ${{ secrets.DOCKERHUB_USERNAME}}/${{ vars.DOCKERHUB_REPO }}:22.04-v${{ steps.new_tag.outputs.new_tag }}
117
- # ${{ secrets.DOCKERHUB_USERNAME}}/${{ vars.DOCKERHUB_REPO }}:latest
118
- # cache-from: type=gha
119
- # cache-to: type=gha,mode=max
Original file line number Diff line number Diff line change 7
7
# Check every PR to main
8
8
pull_request :
9
9
branches :
10
- - " main"
10
+ - main
11
11
12
12
jobs :
13
13
docker-test :
Original file line number Diff line number Diff line change
1
+ name : CD
2
+
3
+ on :
4
+ # Publish a new image to Dockerhub on changes to Dockerfile
5
+ push :
6
+ paths :
7
+ - Dockerfile.ubuntu
8
+
9
+ permissions :
10
+ id-token : write
11
+ contents : write
12
+ packages : write
13
+
14
+ jobs :
15
+ check :
16
+ name : check pr status
17
+ runs-on : ubuntu-22.04
18
+ steps :
19
+ - name : check if PR is merged
20
+ uses : zmynx/github-actions/.github/actions/git/check-merge@feature/gha
21
+
22
+ cd :
23
+ name : continuous-deployment
24
+ needs : [check]
25
+ runs-on : ubuntu-22.04
26
+ outputs :
27
+ new_tag : ${{ steps.semver.outputs.new_tag }}
28
+ steps :
29
+ - name : Checkout
30
+ uses : actions/checkout@v4
31
+
32
+ - name : Set up QEMU
33
+ uses : docker/setup-qemu-action@v3
34
+
35
+ - name : Set up Docker Buildx
36
+ uses : docker/setup-buildx-action@v3
37
+
38
+ - name : Login to Docker Hub
39
+ uses : docker/login-action@v3
40
+ with :
41
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
42
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
43
+
44
+ # In case of a new image I'd like to publish
45
+ - name : Publish image to DockerHub
46
+ uses : docker/build-push-action@v5.1.0
47
+ with :
48
+ context : .
49
+ file : Dockerfile.ubuntu
50
+ platforms : linux/amd64
51
+ push : true
52
+ tags : |
53
+ ${{ secrets.DOCKERHUB_USERNAME}}/${{ vars.DOCKERHUB_REPO }}:22.04-v0.32.0-d76db35-${{ github.sha }}
54
+ ${{ secrets.DOCKERHUB_USERNAME}}/${{ vars.DOCKERHUB_REPO }}:latest
55
+ cache-from : type=gha
56
+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments