From 50aa13c5e9943275bca3132e83b49e59f997084a Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 5 May 2021 15:24:15 +0200 Subject: ci: Add workflow for publishing Docker images This change adds a new Github Actions workflow that publishes the Docker images on publication of a new Github release. --- .github/workflows/publish.yml | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/publish.yml (limited to '.github/workflows/publish.yml') diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..4c74bb36 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,48 @@ +name: Publish Docker image + +on: + release: + types: [published] + +jobs: + push-simulator: + name: Push Simulator + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Push to Docker Hub + uses: docker/build-push-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + repository: atlargeresearch/opendc + tag_with_ref: true + push-api: + name: Push API + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Push to Docker Hub + uses: docker/build-push-action@v1 + with: + context: opendc-web/opendc-web-api + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + repository: atlargeresearch/opendc-web-api + tag_with_ref: true + push-ui: + name: Push UI + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Push to Docker Hub + uses: docker/build-push-action@v1 + with: + context: opendc-web/opendc-web-ui + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + repository: atlargeresearch/opendc-web-ui + tag_with_ref: true -- cgit v1.2.3