fix: bad requirements #120
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: 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 |