Fix 887 #27
Workflow file for this run
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 Build and Publish | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build latest image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./docker/DockerfileLatest | |
push: false | |
tags: pveleskopglc/chipstar:latest | |
outputs: type=docker,dest=/tmp/chipstar-latest.tar | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: chipstar-latest | |
path: /tmp/chipstar-latest.tar | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: chipstar-latest | |
path: /tmp | |
- name: Load Docker image | |
run: docker load --input /tmp/chipstar-latest.tar | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Push latest image | |
run: docker push pveleskopglc/chipstar:latest |