Skip to content

Merge pull request #166 from GamerNoTitle/dev #118

Merge pull request #166 from GamerNoTitle/dev

Merge pull request #166 from GamerNoTitle/dev #118

Workflow file for this run

name: Push Docker Image
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Build tag
run: |
echo "tag=$(date +%Y%m%d-%H%M%S)" >> $GITHUB_ENV
- name: Build the Docker image
run: docker build -t ${{ secrets.DOCKER_USERNAME }}/vsc:$tag .
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push the Docker image
run: |
docker tag ${{ secrets.DOCKER_USERNAME }}/vsc:$tag gamernotitle/vsc:latest
docker push ${{ secrets.DOCKER_USERNAME }}/vsc:$tag
docker push ${{ secrets.DOCKER_USERNAME }}/vsc:latest