From e37e977ec5365b5f1b7eb3d6e74651509187ee82 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Mon, 14 Sep 2020 20:14:10 +0000 Subject: [PATCH] Another stab at CI publishing --- .github/workflows/docker_build_mothd.yml | 8 -------- .github/workflows/docker_publish.yml | 20 ++++++++++++++++++++ .github/workflows/publish.yml | 20 ++++++++++++++++++++ 3 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/docker_publish.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/docker_build_mothd.yml b/.github/workflows/docker_build_mothd.yml index 7e08a56..63b8aaa 100644 --- a/.github/workflows/docker_build_mothd.yml +++ b/.github/workflows/docker_build_mothd.yml @@ -10,11 +10,3 @@ jobs: uses: actions/checkout@v1 - name: Build mothd run: docker build . - - name: Push to GitHub Packages - uses: docker/build-push-action@v1 - with: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - registry: docker.pkg.github.com - repository: dirtbags/moth/moth - tag_with_ref: true diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml new file mode 100644 index 0000000..7e08a56 --- /dev/null +++ b/.github/workflows/docker_publish.yml @@ -0,0 +1,20 @@ +name: Mothd Docker build +on: [push] + +jobs: + build-mothd: + name: Build mothd + runs-on: ubuntu-latest + steps: + - name: Retrieve code + uses: actions/checkout@v1 + - name: Build mothd + run: docker build . + - name: Push to GitHub Packages + uses: docker/build-push-action@v1 + with: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + registry: docker.pkg.github.com + repository: dirtbags/moth/moth + tag_with_ref: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..ab71229 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,20 @@ +name: Publish Container image +on: + release: + types: [published] + +jobs: + publish: + name: Publish Container Image + runs-on: ubuntu-latest + steps: + - name: Retrieve code + uses: actions/checkout@v1 + - name: Push to GitHub Packages + uses: docker/build-push-action@v1 + with: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + registry: docker.pkg.github.com + repository: dirtbags/moth/moth + tag_with_ref: true