diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index abe05d835d..a559299dd8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -5,7 +5,7 @@ on: file: required: true type: string - tag: + tags: type: string load: type: boolean @@ -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' \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bce6c412aa..c7df70b62f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4d9838136c..1e666799bc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/changelog/unreleased/enhancement-docker-latest.md b/changelog/unreleased/enhancement-docker-latest.md new file mode 100644 index 0000000000..7172442c18 --- /dev/null +++ b/changelog/unreleased/enhancement-docker-latest.md @@ -0,0 +1,3 @@ +Enhancement: Add latest tag to revad Docker image with GitHub Actions + +https://github.com/cs3org/reva/pull/3599 \ No newline at end of file