docker #2
Workflow file for this run
This file contains hidden or 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: docker | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| multi: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - | |
| name: Checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - | |
| name: Set up QEMU | |
| uses: docker/setup-qemu-action@v1 | |
| - | |
| name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v1 | |
| - | |
| name: Log into registry ghcr.io | |
| uses: docker/[email protected] | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - | |
| name: Get tag | |
| id: get_tag | |
| run: | | |
| git remote add upstream https://github.com/peak/s5cmd.git | |
| git fetch --tags upstream | |
| VERSION=$(git describe --tags --exclude '*-' --abbrev=0) | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "short_sha=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_OUTPUT | |
| - | |
| name: Build and push | |
| uses: docker/build-push-action@v2 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/arm/v6,linux/arm/v7,linux/386 | |
| tags: | | |
| ghcr.io/coreweave/s5cmd:latest | |
| ghcr.io/coreweave/s5cmd:${{ steps.get_tag.outputs.version }}-${{ steps.get_tag.outputs.short_sha }} | |