-
-
Notifications
You must be signed in to change notification settings - Fork 228
33 lines (28 loc) · 998 Bytes
/
docker-image.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
name: Docker Image CI
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Docker login
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- name: Get repository release tag
id: timeseries
uses: pozetroninc/github-action-get-latest-release@master
with:
excludes: prerelease, draft
repository: ${{ github.repository }}
- name: Build Docker image
run: |
docker build --network=host -t ${{secrets.DOCKER_USER}}/helper:latest -t ${{secrets.DOCKER_USER}}/helper:${{ steps.timeseries.outputs.release }} .
- name: Docker push image
run: |
docker push ${{secrets.DOCKER_USER}}/helper
docker push ${{secrets.DOCKER_USER}}/helper:${{ steps.timeseries.outputs.release }}