Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-takker committed Mar 1, 2024
1 parent 2e88b45 commit 4207c62
Show file tree
Hide file tree
Showing 3 changed files with 199 additions and 10 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Make release

on:
workflow_dispatch:
push:
branches:
- master

jobs:
checking:
name: Check repository
uses: ./.github/workflows/check.yml

build_and_push_docker:
name: Build and push AMD64 and ARM64 images
needs: checking
runs-on: ubuntu-latest
steps:

- name: Set up tag
id: vars
run: echo "sha_short=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_OUTPUT

- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push backend image
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64
context: ./
file: ./docker/rest.dockerfile
tags: |
andytakker/industry-game-rest:latest
andytakker/vk-parser:${{ steps.vars.outputs.sha_short }}
- name: Build and push frontend image
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64
context: ./
file: ./docker/frontend.dockerfile
tags: |
andytakker/industry-game-frontend:latest
andytakker/vk-parser:${{ steps.vars.outputs.sha_short }}
130 changes: 130 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,133 @@ cython_debug/
.DS_Store
ssl_keys/
*.pem
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
20 changes: 10 additions & 10 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ services:

rest:
restart: on-failure
# image: andytakker/industry-game-rest:latest
build:
dockerfile: ./docker/rest.dockerfile
context: .
image: andytakker/industry-game-rest:latest
# build:
# dockerfile: ./docker/rest.dockerfile
# context: .
entrypoint: python -m industry_game
environment:
APP_API_ADDRESS: 0.0.0.0
Expand All @@ -34,12 +34,12 @@ services:

frontend:
restart: on-failure
# image: andytakker/industry-game-frontend:latest
build:
dockerfile: ./docker/frontend.dockerfile
context: .
args:
BASE_URL: https://vk.com
image: andytakker/industry-game-frontend:latest
# build:
# dockerfile: ./docker/frontend.dockerfile
# context: .
# args:
# BASE_URL: https://vk.com
ports:
- 80:80
- 443:443
Expand Down

0 comments on commit 4207c62

Please sign in to comment.