diff --git a/.github/workflows/deploy-tags.yml b/.github/workflows/deploy-tags.yml deleted file mode 100644 index 5f0eda320..000000000 --- a/.github/workflows/deploy-tags.yml +++ /dev/null @@ -1,71 +0,0 @@ -# Note: you may want to update this file and deploy-master.yml at once -name: Publish latest (Docker image of tags) -on: - push: - tags: - - '*' -jobs: - push_server: - name: Push learn-ocaml image to Docker Hub - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v2 - - name: Get tag name - run: tag="${{ github.ref }}"; echo "::set-output name=tag::${tag#refs/tags/}" - id: tag - - name: Push to Docker Hub - uses: docker/build-push-action@v1 - with: - always_pull: true - add_git_labels: true - labels: "org.opencontainers.image.version=${{ steps.tag.outputs.tag }}" - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - repository: ocamlsf/learn-ocaml - tags: latest - tag_with_ref: true - push_client: - name: Push learn-ocaml-client image to Docker Hub - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v2 - - name: Get tag name - run: tag="${{ github.ref }}"; echo "::set-output name=tag::${tag#refs/tags/}" - id: tag - - name: Push to Docker Hub - uses: docker/build-push-action@v1 - with: - always_pull: true - add_git_labels: true - labels: "org.opencontainers.image.version=${{ steps.tag.outputs.tag }}" - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - repository: ocamlsf/learn-ocaml-client - target: client - tags: latest - tag_with_ref: true - push_emacs_client: - name: Push emacs-learn-ocaml-client image to Docker Hub - needs: push_client - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v2 - - name: Get tag name - run: tag="${{ github.ref }}"; echo "::set-output name=tag::${tag#refs/tags/}" - id: tag - - name: Push to Docker Hub - # https://github.com/docker/build-push-action/tree/releases/v1#readme - uses: docker/build-push-action@v1 - with: - path: ci/docker-emacs-learn-ocaml-client - build_args: "base=ocamlsf/learn-ocaml-client,version=${{ steps.tag.outputs.tag }}" - always_pull: true - add_git_labels: true - labels: "org.opencontainers.image.version=${{ steps.tag.outputs.tag }}" - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - repository: ocamlsf/emacs-learn-ocaml-client - tags: ${{ steps.tag.outputs.tag }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf004c271..f832d066e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -120,3 +120,68 @@ jobs: - name: Publish to opam run: | ./scripts/opam-publish.exp "${{ needs.release-please.outputs.tag_name }}" "$opam_repo" "$source_repo" + + # Note: you may want to update the jobs below and deploy-master.yml at once + push_server: + needs: [release-please] + if: ${{ needs.release-please.outputs.release_created }} + name: Push learn-ocaml image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Get tag name + run: tag="${{ needs.release-please.outputs.tag_name }}"; echo "::set-output name=tag::${tag#v}" + id: tag + - name: Push to Docker Hub + uses: docker/build-push-action@v1 + with: + always_pull: true + add_git_labels: true + labels: "org.opencontainers.image.version=${{ steps.tag.outputs.tag }}" + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: ocamlsf/learn-ocaml + tags: "latest,${{ steps.tag.outputs.tag }}" + push_client: + needs: [release-please] + if: ${{ needs.release-please.outputs.release_created }} + name: Push learn-ocaml-client image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Get tag name + run: tag="${{ needs.release-please.outputs.tag_name }}"; echo "::set-output name=tag::${tag#v}" + id: tag + - name: Push to Docker Hub + uses: docker/build-push-action@v1 + with: + always_pull: true + add_git_labels: true + labels: "org.opencontainers.image.version=${{ steps.tag.outputs.tag }}" + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: ocamlsf/learn-ocaml-client + target: client + tags: "latest,${{ steps.tag.outputs.tag }}" + push_emacs_client: + needs: + - release-please + - push_client + if: ${{ needs.release-please.outputs.release_created }} + name: Push emacs-learn-ocaml-client image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Get tag name + run: tag="${{ needs.release-please.outputs.tag_name }}"; echo "::set-output name=tag::${tag#v}" + id: tag + - name: Push to Docker Hub + # https://github.com/docker/build-push-action/tree/releases/v1#readme + uses: docker/build-push-action@v1 + with: + path: ci/docker-emacs-learn-ocaml-client + build_args: "base=ocamlsf/learn-ocaml-client,version=${{ steps.tag.outputs.tag }}" + always_pull: true + add_git_labels: true + labels: "org.opencontainers.image.version=${{ steps.tag.outputs.tag }}" + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: ocamlsf/emacs-learn-ocaml-client + tags: ${{ steps.tag.outputs.tag }}