Created
December 3, 2020 16:26
-
-
Save Nodirbek-Sharipov/6da60b60a0cbafbd11a1db3d0e3f8c16 to your computer and use it in GitHub Desktop.
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: Docker Image CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: docker login | |
env: | |
DOCKER_USER: ${{secrets.DOCKER_USER}} | |
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | |
run: | | |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | |
- name: Build the Docker image | |
run: docker build -t node_docker_dictionary . | |
- name: Tags | |
run: | | |
docker tag node_docker_dictionary ${{ secrets.DOCKER_USER }}/node_docker_dictionary:${{ github.sha }} | |
docker tag node_docker_dictionary ${{ secrets.DOCKER_USER }}/node_docker_dictionary:latest | |
- name: Docker Push | |
run: | | |
docker push ${{ secrets.DOCKER_USER }}/node_docker_dictionary:${{ github.sha }} | |
docker push ${{ secrets.DOCKER_USER }}/node_docker_dictionary:latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment