Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Ensure release-please triggers docker/build-push-action jobs #443

Merged
merged 1 commit into from Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
71 changes: 0 additions & 71 deletions .github/workflows/deploy-tags.yml

This file was deleted.

65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -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 }}