Skip to content

Commit 8afa42d

Browse files
committed
Added the build workflow yml for netsage cms.
1 parent 22790a6 commit 8afa42d

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/netsage-cms.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Netsage CMS Builds
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'netsage_cms/**'
8+
9+
jobs:
10+
build_commit:
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: netsage_cms
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Get shortsha
18+
id: vars
19+
run: |
20+
if [ -z "$EVENT_SHA" ]; then SHORT_SHA=${GITHUB_SHA::8}; else SHORT_SHA=${EVENT_SHA::8}; fi
21+
echo ::set-output name=sha_short::${SHORT_SHA}
22+
env:
23+
EVENT_SHA: ${{ github.event.client_payload.sha }}
24+
- name: Print shortsha
25+
run: |
26+
echo $SHORTSHA
27+
env:
28+
SHORTSHA: ${{ steps.vars.outputs.sha_short }}
29+
- uses: docker/setup-buildx-action@v2
30+
name: Setup Docker Builds
31+
- uses: docker/login-action@v2
32+
name: Log in to docker
33+
with:
34+
username: ${{ secrets.DOCKERHUB_USERNAME }}
35+
password: ${{ secrets.DOCKERHUB_TOKEN }}
36+
- uses: docker/build-push-action@v3
37+
name: Build & push commit tagged Docker image
38+
with:
39+
context: netsage_cms
40+
push: true
41+
tags: taccwma/netsage-cms:${{ steps.vars.outputs.sha_short }}

0 commit comments

Comments
 (0)