From 57df0716542b962001a5c13114d3a9f4c75be9a0 Mon Sep 17 00:00:00 2001 From: AndrewMarchukov Date: Wed, 13 Jul 2022 20:57:09 +0400 Subject: [PATCH] fixed ci --- .github/workflows/docker-image.yml | 20 ++++++- .gitignore | 96 ++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index a12e06c..af07b29 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,5 +1,5 @@ name: Docker Image CI - +description: build insurgency-sandstorm on: push: branches: [ master ] @@ -12,17 +12,31 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Check new version + id: status + run: | + #!/bin/bash + LOCALAPPVER=$(cat sandstorm.version) + REMOTEAPPVER=$(curl -s -X GET 'https://api.steamcmd.net/v1/info/581330' | jq -r -e '.data."581330".depots."581333".manifests.public') + if [[ "$LOCALAPPVER" != "$REMOTEAPPVER" ]]; then + echo "$REMOTEAPPVER" > sandstorm.version + exit 0 + else + exit 1 + fi + shell: bash - name: Login to DockerHub + if: steps.status.outcome == 'success' uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push + if: steps.status.outcome == 'success' uses: docker/build-push-action@v2 with: context: . push: true - tags: andrewmhub/insurgency-sandstorm:latest - + tags: andrewmhub/insurgency-sandstorm:latest \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aaf0293 --- /dev/null +++ b/.gitignore @@ -0,0 +1,96 @@ +### Scala template +*.class +*.log + +# sbt specific +.cache +.history +.lib/ +dist/* +target/ +lib_managed/ +src_managed/ +project/boot/ +project/plugins/project/ + +# Scala-IDE specific +.scala_dependencies +.worksheet +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio + +*.iml + +## Directory-based project format: +.idea/ +# if you remove the above rule, at least ignore the following: + +# User-specific stuff: +# .idea/workspace.xml +# .idea/tasks.xml +# .idea/dictionaries + +# Sensitive or high-churn files: +# .idea/dataSources.ids +# .idea/dataSources.xml +# .idea/sqlDataSources.xml +# .idea/dynamic.xml +# .idea/uiDesigner.xml + +# Gradle: +# .idea/gradle.xml +# .idea/libraries + +# Mongo Explorer plugin: +# .idea/mongoSettings.xml + +## File-based project format: +*.ipr +*.iws + +## Plugin-specific files: + +# IntelliJ +/out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +### Java template +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* +### Linux template +*~ + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# Created by .ignore support plugin (hsz.mobi) +.scalafmt.conf + +#vscode settings +.vscode/ + +app +db +node_modules \ No newline at end of file