-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from RNAcentral/separate-base-image
Separate base image build
- Loading branch information
Showing
49 changed files
with
58,129 additions
and
55,610 deletions.
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ docs/_* | |
.github | ||
.vscode | ||
.git | ||
1.4/ |
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,76 @@ | ||
name: Publish Base Docker image to DockerHub | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'base_image/**' | ||
- '.github/workflows/base-image.yml' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USER }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Docker Meta | ||
id: docker_meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: rnacentral/r2dt-base | ||
flavor: latest=false | ||
tags: | | ||
type=raw,value=latest | ||
type=ref,event=pr | ||
type=ref,event=branch | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
- name: Build and push Docker image | ||
id: build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
labels: ${{ steps.docker_meta.outputs.labels }} | ||
tags: ${{ steps.docker_meta.outputs.tags }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
file: base_image/Dockerfile | ||
context: base_image/ | ||
|
||
|
||
- name: Find comment for image tags | ||
uses: peter-evans/find-comment@v2 | ||
if: github.event_name == 'pull_request' | ||
id: fc | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: Docker base image tag(s) pushed | ||
|
||
- name: Create or update comment for image tags | ||
uses: peter-evans/create-or-update-comment@v2 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
comment-id: ${{ steps.fc.outputs.comment-id }} | ||
issue-number: ${{ github.event.pull_request.number }} | ||
body: | | ||
Docker base image tag(s) pushed: | ||
```text | ||
${{ steps.docker_meta.outputs.tags }} | ||
``` | ||
Labels added to images: | ||
```text | ||
${{ steps.docker_meta.outputs.labels }} | ||
``` | ||
edit-mode: replace |
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
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
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
Oops, something went wrong.