Skip to content

Fix link to documentation #37

Fix link to documentation

Fix link to documentation #37

Workflow file for this run

name: build and push docker image
on:
push:
branches:
- main
jobs:
dockerhub:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: set env
run: |
curl -o setenv.sh -- 'https://raw.githubusercontent.com/t2-project/kube/main/setenv.sh'
vi setenv.sh -c ':%s/^export //' -c ':%s/\(.*\)#.*/\1/' -c ':%s/\s*$//g' -c ':wq' # Strip out 'export ' at the beginning, comments, and trailing whitespace
cat setenv.sh >> $GITHUB_ENV
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: check out order
uses: actions/checkout@v2
with:
path: './order'
- name: check out common
uses: actions/checkout@master
with:
repository: t2-project/common
path: './common'
- name: set up jdk
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- name: build common
run: cd common && ./mvnw clean install
- name: verify order
run: cd order && ./mvnw clean install
- run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build and push (manual)
run: |
echo ${{ env.RELEASE_VERSION }}
echo $RELEASE_VERSION
cd order
docker build -t t2project/order:${{ env.RELEASE_VERSION }} .
docker push t2project/order:${{ env.RELEASE_VERSION }}