Move to ubuntu latest #8
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
name: Build and Push ensembl-update-env container | |
on: | |
push: | |
paths: | |
- "ensembl-update/Dockerfile" | |
- "ensembl-update/tag" | |
- ".github/workflows/ens_update_env_container.yaml" | |
jobs: | |
test: | |
name: Build image | |
runs-on: ubuntu-latest | |
env: | |
IMAGE_NAME: ensembl-update-env | |
if: startsWith( github.ref, 'refs/heads/feature/' ) | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Read tag | |
id: gettag | |
run: echo "::set-output name=tag::$(head -n 1 ensembl-update/tag )" | |
- name: Build image | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: ${{ env.IMAGE_NAME }} | |
tags: latest ${{ steps.gettag.outputs.tag }} | |
dockerfiles: | | |
./ensembl-update/Dockerfile | |
deploy: | |
name: Build and deploy image to quay.io/ebigxa | |
runs-on: ubuntu-latest | |
env: | |
IMAGE_NAME: ensembl-update-env | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Read tag | |
id: gettag | |
run: echo "::set-output name=tag::$(head -n 1 ensembl-update/tag )" | |
- name: Build image | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: ${{ env.IMAGE_NAME }} | |
tags: latest ${{ steps.gettag.outputs.tag }} | |
dockerfiles: | | |
./ensembl-update/Dockerfile | |
- name: Push to Quay | |
id: push-to-quay | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build-image.outputs.image }} | |
tags: ${{ steps.build-image.outputs.tags }} | |
registry: quay.io/ebigxa | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_TOKEN }} | |
- name: Use the image | |
run: echo "New image has been pushed to ${{ steps.push-to-quay.outputs.registry-paths }}" |