From 02e5c1424fc8b326eafcfd1bc15f91bd0b845f2f Mon Sep 17 00:00:00 2001 From: Joseph Manley Date: Thu, 30 Apr 2020 20:14:53 -0400 Subject: [PATCH] Changes to GitHub Actions Changes to GitHub Actions Changes to GitHub Actions Changes to GitHub Actions Changes to GitHub Actions Changes to GitHub Actions Changes to GitHub Actions Changes to GitHub Actions Changes to GitHub Actions Changes to GitHub Actions Changes to GitHub Actions Changes to GitHub Actions Changes to GitHub Actions Changes to GitHub Actions Changes to GitHub Actions --- .github/workflows/server_push_docker.yml | 71 ++++++++++++++++++++++++ .github/workflows/test_server.yml | 1 - 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/server_push_docker.yml diff --git a/.github/workflows/server_push_docker.yml b/.github/workflows/server_push_docker.yml new file mode 100644 index 0000000..d320afa --- /dev/null +++ b/.github/workflows/server_push_docker.yml @@ -0,0 +1,71 @@ +name: Push Docker Image + +on: + release: + types: + - created + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + - id: get_tag + name: Get Tag + env: + GITHUB_HEAD_REF: $${{ github.head_ref }} + GITHUB_BASE_REF: ${{ github.base_ref }} + run: | + TAG=$(jq --raw-output '.release.tag_name' $GITHUB_EVENT_PATH) + echo ::set-output name=TAG::$TAG + - name: Push Tag to Docker Hub + uses: opspresso/action-docker@master + with: + args: --docker + env: + USERNAME: ${{ secrets.DOCKER_USERNAME }} + PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + BUILD_PATH: "server" + DOCKERFILE: "server/Dockerfile" + IMAGE_NAME: "josephbmanley/defend-together" + TAG_NAME: ${{ steps.get_tag.outputs.TAG }} + LATEST: "false" + - name: Push Latest to Docker Hub + uses: opspresso/action-docker@master + with: + args: --docker + env: + USERNAME: ${{ secrets.DOCKER_USERNAME }} + PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + BUILD_PATH: "server" + DOCKERFILE: "server/Dockerfile" + IMAGE_NAME: "josephbmanley/defend-together" + TAG_NAME: ${{ steps.get_tag.outputs.TAG }} + LATEST: "true" + - name: Push Tag to GitHub Package + uses: opspresso/action-docker@master + with: + args: --docker + env: + USERNAME: ${{ github.actor }} + PASSWORD: ${{ secrets.GITHUB_TOKEN }} + REGISTRY: "docker.pkg.github.com" + BUILD_PATH: "server" + DOCKERFILE: "server/Dockerfile" + IMAGE_NAME: "defend-together" + TAG_NAME: ${{ steps.get_tag.outputs.TAG }} + LATEST: "false" + - name: Push Latest to GitHub Package + uses: opspresso/action-docker@master + with: + args: --docker + env: + USERNAME: ${{ github.actor }} + PASSWORD: ${{ secrets.GITHUB_TOKEN }} + REGISTRY: "docker.pkg.github.com" + BUILD_PATH: "server" + DOCKERFILE: "server/Dockerfile" + IMAGE_NAME: "defend-together" + TAG_NAME: ${{ steps.get_tag.outputs.TAG }} + LATEST: "true" \ No newline at end of file diff --git a/.github/workflows/test_server.yml b/.github/workflows/test_server.yml index 0f70053..6136e05 100644 --- a/.github/workflows/test_server.yml +++ b/.github/workflows/test_server.yml @@ -13,7 +13,6 @@ on: jobs: Testing: runs-on: ubuntu-latest - container: steps: - name: Checkout uses: actions/checkout@v1