Merge pull request #3 from tim0-12432/dependabot/pip/requests-2.31.0 #53
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 Image CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: Install tsc | |
run: npm install -g typescript | |
- name: Login to Github Packages | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get the tag | |
run: echo "vartag=$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_ENV | |
- name: Build static files | |
run: tsc | |
- name: Build the Docker image | |
run: docker build . --file Dockerfile --tag ghcr.io/tim0-12432/mqtt-listener:${{ env.vartag }} | |
- name: Push the tagged Docker image | |
run: docker push ghcr.io/tim0-12432/mqtt-listener:${{ env.vartag }} | |
- name: Build the latest Docker image | |
run: docker build . --file Dockerfile --tag ghcr.io/tim0-12432/mqtt-listener:latest | |
- name: Push the latest Docker image | |
run: docker push ghcr.io/tim0-12432/mqtt-listener:latest |