Skip to content

Commit

Permalink
ci pipeline test
Browse files Browse the repository at this point in the history
  • Loading branch information
Masterjx9 committed Sep 13, 2022
1 parent 85abc86 commit b2f821b
Showing 1 changed file with 83 additions and 58 deletions.
141 changes: 83 additions & 58 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,100 @@
name: Docker Image CI
name: Push Container to Heroku

on:
on:
push:
branches: [ "main" ]
branches:
- master

jobs:

build:

runs-on: ubuntu-latest

steps:
# -
# name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# -
# name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# -
# name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/checkout@v1
- name: Login to Heroku Container registry
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku container:login
- name: Build and push
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku container:push -a ${{ secrets.HEROKU_APP_NAME }} web
- name: Release
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku container:release -a ${{ secrets.HEROKU_APP_NAME }} web

# name: Docker Image CI

# on:
# push:
# branches: [ "main" ]

# jobs:

# build:

# runs-on: ubuntu-latest

# steps:
# # -
# # name: Set up QEMU
# # uses: docker/setup-qemu-action@v2
# # -
# # name: Set up Docker Buildx
# # uses: docker/setup-buildx-action@v2
# # -
# # name: Login to DockerHub
# # uses: docker/login-action@v2
# # with:
# # username: ${{ secrets.DOCKERHUB_USERNAME }}
# # password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Build image and push to Docker Hub and GitHub Container Registry
# uses: docker/build-push-action@v2
# with:
# # Note: tags has to be all lower-case
# tags: |
# masterjx9/vgmify:latest
# # build on feature branches, push only on main branch
# push: ${{ github.ref == 'refs/heads/main' }}
## ⬇ IMPORTANT PART ⬇ ###
# # - name: Build image and push to Docker Hub and GitHub Container Registry
# # uses: docker/build-push-action@v2
# # with:
# # # Note: tags has to be all lower-case
# # tags: |
# # masterjx9/vgmify:latest
# # # build on feature branches, push only on main branch
# # push: ${{ github.ref == 'refs/heads/main' }}
# ## ⬇ IMPORTANT PART ⬇ ###

# Check-out your repository.
- name: Checkout
uses: actions/checkout@v2
# # Check-out your repository.
# - name: Checkout
# uses: actions/checkout@v2

- name: Build, Push and Release a Docker container to Heroku. # Your custom step name
uses: gonuit/[email protected] # GitHub action name (leave it as it is).
with:
# Below you must provide variables for your Heroku app.
# - name: Build, Push and Release a Docker container to Heroku. # Your custom step name
# uses: gonuit/[email protected] # GitHub action name (leave it as it is).
# with:
# # Below you must provide variables for your Heroku app.

# The email address associated with your Heroku account.
# If you don't want to use repository secrets (which is recommended) you can do:
# email: [email protected]
email: ${{ secrets.HEROKU_EMAIL }}
# # The email address associated with your Heroku account.
# # If you don't want to use repository secrets (which is recommended) you can do:
# # email: [email protected]
# email: ${{ secrets.HEROKU_EMAIL }}

# Heroku API key associated with provided user's email.
# Api Key is available under your Heroku account settings.
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
# # Heroku API key associated with provided user's email.
# # Api Key is available under your Heroku account settings.
# heroku_api_key: ${{ secrets.HEROKU_API_KEY }}

# Name of the heroku application to which the build is to be sent.
heroku_app_name: ${{ secrets.HEROKU_APP_NAME }}
# # Name of the heroku application to which the build is to be sent.
# heroku_app_name: ${{ secrets.HEROKU_APP_NAME }}

# (Optional, default: "./")
# Dockerfile directory.
# For example, if you have a Dockerfile in the root of your project, leave it as follows:
dockerfile_directory: ./
# # (Optional, default: "./")
# # Dockerfile directory.
# # For example, if you have a Dockerfile in the root of your project, leave it as follows:
# dockerfile_directory: ./

# (Optional, default: "Dockerfile")
# Dockerfile name.
dockerfile_name: Dockerfile
# # (Optional, default: "Dockerfile")
# # Dockerfile name.
# dockerfile_name: Dockerfile

# (Optional, default: "")
# Additional options of docker build command.
docker_options: "--no-cache"
# # (Optional, default: "")
# # Additional options of docker build command.
# docker_options: "--no-cache"

# (Optional, default: "web")
# Select the process type for which you want the docker container to be uploaded.
# By default, this argument is set to "web".
# For more information look at https://devcenter.heroku.com/articles/process-model
process_type: web
# # (Optional, default: "web")
# # Select the process type for which you want the docker container to be uploaded.
# # By default, this argument is set to "web".
# # For more information look at https://devcenter.heroku.com/articles/process-model
# process_type: web

0 comments on commit b2f821b

Please sign in to comment.