Skip to content

feat/upgrade-to-dotnet-8 (#127) #39

feat/upgrade-to-dotnet-8 (#127)

feat/upgrade-to-dotnet-8 (#127) #39

# this is a basic workflow to build a docker image and push it to docker hub
name: dockerhub-push
# controls when the action will run.
# triggers the workflow on push or pull request events but only for the main branch
on:
push:
branches: [main]
# a workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# this workflow contains a single job called "push_to_registry"
push_to_registry:
# the type of runner that the job will run on
runs-on: ubuntu-latest
# steps represent a sequence of tasks that will be executed as part of the job
steps:
# checks-out your repository under $GITHUB_WORKSPACE, so the job can access it
- name: checkout the repository
uses: actions/checkout@v2
# set up qemu
- name: set up qemu
uses: docker/setup-qemu-action@v1
# set up docker buildx
- name: set up docker buildx
uses: docker/setup-buildx-action@v1
# login into docker hub
- name: login to docker hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# build the docker image then push it to docker hub
- name: build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: bejebeje/mvc:latest