Merge pull request #8 from HenrikDK/updates #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Publish | |
on: | |
push: | |
# Publish `master` as Docker `latest` image. | |
branches: | |
- main | |
- master | |
jobs: | |
build-dashboard: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Build image | |
run: docker build . --file Dockerfile --tag sentinel-dashboard-ui | |
working-directory: Sentinel.Dashboard.Ui | |
- name: Log into registry | |
run: echo "${{ secrets.DOCKER_TOKEN }}" | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin | |
- name: Push image | |
run: | | |
build_id=$(date +'%Y%m%d') | |
build_id+="-" | |
build_id+=$(git rev-parse --short "$GITHUB_SHA") | |
docker tag sentinel-dashboard-ui ${{ secrets.DOCKER_USER }}/sentinel-dashboard-ui:$build_id | |
docker push ${{ secrets.DOCKER_USER }}/sentinel-dashboard-ui:$build_id |