Add Game Making Post #16
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: Docker Image CI | |
on: | |
push: | |
branches: [ "main" ] | |
env: | |
VERSION: ${{ secrets.VERSION_PRIMARY }}.${{ github.run_number }} | |
IMAGE_NAME: archeious/unbiasedgeek-com | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Login to DockerHub Registry | |
run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin | |
- name: Build the tagged Docker image | |
run: docker build . --file Dockerfile --tag ${{env.IMAGE_NAME}}:${{env.VERSION}} | |
- name: Push the tagged Docker image | |
run: docker push ${{env.IMAGE_NAME}}:${{env.VERSION}} | |
- name: Build the latest Docker image | |
run: docker build . --file Dockerfile --tag ${{env.IMAGE_NAME}}:latest | |
- name: Push the latest Docker image | |
run: docker push ${{env.IMAGE_NAME}}:latest |