forked from IT61/it61.info
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tech: update deps and add github actions
- Loading branch information
Showing
14 changed files
with
1,533 additions
and
922 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Deploy container to production | ||
on: workflow_dispatch | ||
jobs: | ||
deploy: | ||
name: deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Update and restart docker container | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.DEPLOY_HOST }} | ||
username: ${{ secrets.DEPLOY_USERNAME }} | ||
key: ${{ secrets.DEPLOY_KEY }} | ||
script: sudo /opt/it52/update_docker |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Docker build and push develpoment | ||
on: | ||
push: | ||
branches: | ||
- 'it52' | ||
jobs: | ||
build-development: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./ | ||
file: ./docker/Dockerfile | ||
build-args: RAILS_MASTER_KEY=${{ secrets.RAILS_MASTER_KEY }} | ||
builder: ${{ steps.buildx.outputs.name }} | ||
push: true | ||
tags: it52/rails:latest | ||
cache-from: type=registry,ref=it52/rails:buildcache-dev | ||
cache-to: type=registry,ref=it52/rails:buildcache-dev,mode=max |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Docker build and push production | ||
on: | ||
push: | ||
branches: | ||
- 'it52' | ||
jobs: | ||
build-production: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./ | ||
file: ./docker/Dockerfile.production | ||
build-args: RAILS_MASTER_KEY=${{ secrets.RAILS_MASTER_KEY }} | ||
builder: ${{ steps.buildx.outputs.name }} | ||
push: true | ||
tags: it52/rails:production | ||
cache-from: type=registry,ref=it52/rails:buildcache-prod | ||
cache-to: type=registry,ref=it52/rails:buildcache-prod,mode=max |
File renamed without changes.
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
Oops, something went wrong.