test the action #1
This file contains hidden or 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: CarlaViz Docker Deployment | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
release: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build Docker image on Tag | |
if: github.ref != 'refs/heads/master' | |
run: docker build -t bhaas96/carlaviz:${{ github.ref_name }} . | |
- name: Push image on Tag | |
if: github.ref != 'refs/heads/master' | |
run: docker push bhaas96/carlaviz:${{ github.ref_name }} | |
- name: Build Docker image on Master | |
if: github.ref == 'refs/heads/master' | |
run: docker build -t bhaas96/carlaviz:latest . | |
- name: Push image on Master | |
if: github.ref == 'refs/heads/master' | |
run: docker push bhaas96/carlaviz:latest |