diff options
author | joffrey-bion <joffrey.bion@gmail.com> | 2020-12-12 21:30:29 +0100 |
---|---|---|
committer | joffrey-bion <joffrey.bion@gmail.com> | 2020-12-12 22:05:35 +0100 |
commit | 0967c8d72c2b373baf3600930c48eb020699f7e2 (patch) | |
tree | fa21f251a5935bea6796d6437440fc245fd8756a /.github/workflows | |
parent | Cleanup helper method in sw-client (diff) | |
download | seven-wonders-0967c8d72c2b373baf3600930c48eb020699f7e2.tar.gz seven-wonders-0967c8d72c2b373baf3600930c48eb020699f7e2.tar.bz2 seven-wonders-0967c8d72c2b373baf3600930c48eb020699f7e2.zip |
Push Docker image to Heroku, remove Travis CI
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/ci.yml | 76 |
1 files changed, 32 insertions, 44 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf36ba72..909ab1aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Set up JDK 13 uses: actions/setup-java@v1.4.3 with: @@ -32,54 +33,41 @@ jobs: - name: Build with Gradle run: ./gradlew build - - name: Docker push to GitHub Container Registry - uses: docker/build-push-action@v1 - with: - path: ./sw-server - username: ${{ github.actor }} - password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }} - registry: ghcr.io - repository: joffrey-bion/seven-wonders-server - tag_with_ref: true - tag_with_sha: true + # technically optional, brings support for more platform to Docker Buildx + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + # required for Docker build/push + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 - - name: Docker push to DockerHub - uses: docker/build-push-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 with: - path: ./sw-server username: hildan password: ${{ secrets.DOCKERHUB_TOKEN }} - repository: hildan/seven-wonders-server - tag_with_ref: true - tag_with_sha: true -# - name: Docker push to GitHub Packages -# uses: docker/build-push-action@v1 -# with: -# path: ./sw-server -# username: ${{ github.actor }} -# password: ${{ github.token }} -# registry: docker.pkg.github.com -# repository: joffrey-bion/seven-wonders/sw-server -# tag_with_ref: true -# tag_with_sha: true + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }} -# - name: Docker push to Heroku -# uses: docker/build-push-action@v1 -# with: -# path: ./sw-server -# username: _ -# password: ${{ secrets.HEROKU_API_KEY }} -# registry: registry.heroku.com -# repository: seven-wonders-online/web -# tag_with_ref: true -# tag_with_sha: true + - name: Login to Heroku Container Registry + uses: docker/login-action@v1 + with: + registry: registry.heroku.com + username: ${{ secrets.HEROKU_EMAIL }} + password: ${{ secrets.HEROKU_API_KEY }} -# - name: Docker push to Heroku -# uses: akhileshns/heroku-deploy@v3.0.4 -# with: -# heroku_api_key: ${{secrets.HEROKU_API_KEY}} -# heroku_app_name: "seven-wonders-online" -# heroku_email: ${{secrets.HEROKU_EMAIL}} -# usedocker: true -# appdir: "./sw-server" + - name: Build and push to DockerHub and GitHub Container Registry + uses: docker/build-push-action@v2 + with: + context: ./sw-server + file: ./sw-server/Dockerfile + push: true + tags: | + hildan/seven-wonders-server:latest + ghcr.io/joffrey-bion/seven-wonders-server:latest + registry.heroku.com/seven-wonders-online/web |