From c53621b640d866cf12681fe45a1fdb96d743f67d Mon Sep 17 00:00:00 2001 From: Vlad Dinu <62345326+vladd-bit@users.noreply.github.com> Date: Mon, 23 Aug 2021 14:59:44 +0300 Subject: [PATCH] Github docker action template. --- .github/workflows/main.yml | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..3a4a691 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,51 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + release: + types: [published] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# 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 "build" + build: + # 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: + - name: checkout repo + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + uses: actions/checkout@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: cogstacksystems/annotations-ingester + + - name: Build and push Docker images + # You may pin to the exact commit or the version. + uses: docker/build-push-action@v2.7.0 + with: + allow: network.host + github-token: ${{ github.token }} + +