Skip to content

🍑Update docker-publish.yml #3

🍑Update docker-publish.yml

🍑Update docker-publish.yml #3

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push Docker image with version
run: |
ref_name=$(echo "${{ github.ref }}" | sed -e 's,refs/heads/,,g' -e 's,refs/tags/,,g')
docker build . -t johnserfseed/tiktokweb:$ref_name
docker push johnserfseed/tiktokweb:$ref_name