forked from ChinmayKumarDas/aksscripts
-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (30 loc) · 1.18 KB
/
blank.yml
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
name: build-and-push
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup shc tool
run: |
sudo apt-get update && sudo apt-get install software-properties-common -y
sudo add-apt-repository ppa:neurobin/ppa -y
sudo apt-get update && sudo apt-get install shc -y
- name: Create new binary using script
run: |
rm -f l200labs_binaries/*
bash shc_script_converter.sh
- name: Login to Docker Registry
run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
- name: Get the version
run: echo ::set-env name=TAG_ID::$(echo ${GITHUB_REF:10})
- name: Build the tagged Docker image
run: docker build . --file Dockerfile -t sturrent/l200labs:"${{ env.TAG_ID }}"
- name: Push the tagged Docker image
run: docker push sturrent/l200labs:"${{ env.TAG_ID }}"
- name: Tag the latest Docker image
run: docker tag sturrent/l200labs:"${{ env.TAG_ID }}" sturrent/l200labs:latest
- name: Push the latest Docker image
run: docker push sturrent/l200labs:latest