-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.61 KB
/
dev.yml
File metadata and controls
52 lines (48 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: dev
on:
push:
branches:
- "main"
jobs:
docker:
runs-on: ubuntu-latest
steps:
# Gets the package.json
- uses: actions/checkout@v4
with:
sparse-checkout: .
- name: Set short git commit SHA
id: vars
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: Build and push
uses: docker/build-push-action@v6
with:
file: ./Containerfile
platforms: linux/amd64
push: true
tags: ollyscoding/bumpgen-test:${{ steps.package-version.outputs.current-version }}-${{ env.COMMIT_SHORT_SHA }}
- uses: actions/github-script@v7
with:
script: |
if (context.issue.number) {
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Published dev build ollyscoding/bumpgen-test:${{ steps.package-version.outputs.current-version }}-${{ env.COMMIT_SHORT_SHA }}'
})
}