-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Automatically rebuild development/CI Docker images
- Loading branch information
Showing
2 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# NOTE: This name appears in GitHub's Checks API and in workflow's status badge. | ||
name: docker | ||
|
||
# Trigger the workflow when: | ||
on: | ||
# A push occurs to one of the matched branches. | ||
push: | ||
branches: | ||
- master | ||
- stable/* | ||
paths: | ||
- docker/** | ||
# XXX: Remove section below, this is only for testing. | ||
pull_request: | ||
branches: | ||
- master | ||
- stable/* | ||
paths: | ||
- docker/** | ||
|
||
jobs: | ||
|
||
build-images: | ||
# NOTE: This name appears in GitHub's Checks API. | ||
name: build-images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Determine tag name | ||
id: determine_tag | ||
shell: bash | ||
run: | | ||
echo ${GITHUB_REF} | ||
branch=${GITHUB_REF#refs/heads/} | ||
branch=${branch//\//-} | ||
echo "##[set-output name=tag;]$(echo ${branch})" | ||
- name: "Rebuild oasisprotocol/oasis-core-dev:${{ steps.determine_tag.outputs.tag }}" | ||
uses: docker/build-push-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_ACCESS_TOKEN }} | ||
repository: oasisprotocol/oasis-core-dev | ||
tags: ${{ steps.determine_tag.outputs.tag }} | ||
add_git_labels: true | ||
path: docker/development | ||
always_pull: true | ||
- name: "Rebuild oasisprotocol/oasis-core-ci:${{ steps.determine_tag.outputs.tag }}" | ||
uses: docker/build-push-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_ACCESS_TOKEN }} | ||
repository: oasisprotocol/oasis-core-ci | ||
tags: ${{ steps.determine_tag.outputs.tag }} | ||
add_git_labels: true | ||
path: docker/testing | ||
build_args: OASIS_CORE_DEV_BASE_TAG=${{ steps.determine_tag.outputs.tag }} | ||
always_pull: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters