Skip to content

Commit

Permalink
add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
agengdp authored Nov 26, 2020
1 parent ea2a69b commit f53abcb
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This is a basic workflow to help you get started with Actions

name: Build And Deploy to DockerHub

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
env:
GITHUB_RUN_ID: ${{ github.run_id }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IMAGE_REPO: rsamit/lumen

# 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:
- id: release
uses: rymndhng/release-on-push-action@master
with:
bump_version_scheme: patch

- name: Check Output Parameters
run: |
echo "Got tag name ${{ steps.release.outputs.tag_name }}"
echo "Got release version ${{ steps.release.outputs.version }}":
echo "Got dockerhub username ${{ secrets.DOCKER_IO_REGISTRY_USER }}":
echo "Got dockerhub password ${{ secrets.DOCKER_IO_REGISTRY_PASSWORD }}":
echo "Got dockerhub image repo ${{ env.IMAGE_REPO }}":
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Build docker images and push
- name: Build and push Docker images
uses: docker/build-push-action@v1.1.0
with:
username: ${{ secrets.DOCKER_IO_REGISTRY_USER }}
password: ${{ secrets.DOCKER_IO_REGISTRY_PASSWORD }}
repository: ${{ env.IMAGE_REPO }}
tags: latest, ${{ steps.release.outputs.tag_name }}

0 comments on commit f53abcb

Please sign in to comment.