Skip to content

Commit

Permalink
Add latest tag to revad Docker image with GitHub Actions (#3599)
Browse files Browse the repository at this point in the history
  • Loading branch information
vascoguita authored Jan 13, 2023
1 parent d9f5a3e commit ef15e58
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
file:
required: true
type: string
tag:
tags:
type: string
load:
type: boolean
Expand All @@ -26,17 +26,17 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build ${{ (inputs.push && 'and push') || '' }} ${{ inputs.tag }} Docker image
- name: Build ${{ (inputs.push && 'and push') || '' }} ${{ inputs.tags }} Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ${{ inputs.file }}
tags: ${{ (inputs.push && format('{0}/', secrets.DOCKERHUB_ORGANIZATION)) || '' }}${{ inputs.tag }}
tags: ${{ inputs.tags }}
load: ${{ inputs.load }}
push: ${{ inputs.push }}
- name: Upload ${{ inputs.tag }} Docker image to artifacts
- name: Upload ${{ inputs.tags }} Docker image to artifacts
uses: ishworkh/docker-image-artifact-upload@v1
if: ${{ inputs.load }}
with:
image: ${{ inputs.tag }}
image: ${{ inputs.tags }}
retention_days: '1'
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ jobs:
fail-fast: false
matrix:
include:
- image: reva
tag: reva:${{ github.ref_name }}
- image: revad
tag: revad:${{ github.ref_name }}
- image: revad-eos
tag: revad:${{ github.ref_name }}-eos
- image: revad-ceph
tag: revad:${{ github.ref_name }}-ceph
- file: docker/Dockerfile.reva
tags: ${{ vars.DOCKERHUB_ORGANIZATION }}/reva:${{ github.ref_name }}
- file: docker/Dockerfile.revad
tags: ${{ vars.DOCKERHUB_ORGANIZATION }}/revad:${{ github.ref_name }},${{ vars.DOCKERHUB_ORGANIZATION }}/revad:latest
- file: docker/Dockerfile.revad-eos
tags: ${{ vars.DOCKERHUB_ORGANIZATION }}/revad:${{ github.ref_name }}-eos
- file: docker/Dockerfile.revad-ceph
tags: ${{ vars.DOCKERHUB_ORGANIZATION }}/revad:${{ github.ref_name }}-ceph
uses: ./.github/workflows/docker.yml
secrets: inherit
with:
file: docker/Dockerfile.${{ matrix.image }}
tag: ${{ matrix.tag }}
file: ${{ matrix.file }}
tags: ${{ matrix.tags }}
push: true
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ jobs:
strategy:
fail-fast: false
matrix:
image: [reva, revad-eos, revad-ceph]
file: [docker/Dockerfile.reva, docker/Dockerfile.revad-eos, docker/Dockerfile.revad-ceph]
uses: ./.github/workflows/docker.yml
with:
file: docker/Dockerfile.${{ matrix.image }}
file: ${{ matrix.file }}
docker-revad:
name: docker (revad)
name: docker (docker/Dockerfile.revad)
uses: ./.github/workflows/docker.yml
with:
file: docker/Dockerfile.revad
tag: revad:test
tags: revad:test
load: true
litmus:
needs: docker-revad
Expand Down
3 changes: 3 additions & 0 deletions changelog/unreleased/enhancement-docker-latest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Enhancement: Add latest tag to revad Docker image with GitHub Actions

https://github.com/cs3org/reva/pull/3599

0 comments on commit ef15e58

Please sign in to comment.