-
Notifications
You must be signed in to change notification settings - Fork 4
25 lines (21 loc) · 829 Bytes
/
dockerimage.yml
File metadata and controls
25 lines (21 loc) · 829 Bytes
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
name: Docker Build
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Get the version
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
- name: Build the versioned and the latest Docker image
run: docker build . -t raonigabriel/theia-java:${{steps.vars.outputs.tag}} -t raonigabriel/theia-java:latest
- name: Push the versioned Docker image
run: docker push raonigabriel/theia-java:${{steps.vars.outputs.tag}}
- name: Push the latest Docker image
run: docker push raonigabriel/theia-java:latest