Handle multiple inbox buckets #50
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: Build and push bpctl image | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: [ "v*" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Harbor | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: harbor.nbis.se | |
| username: ${{ secrets.HARBOR_USERNAME }} | |
| password: ${{ secrets.HARBOR_PASSWORD }} | |
| - name: Extract version | |
| id: version | |
| run: | | |
| if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then | |
| echo "version=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "version=dev-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Build and push image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Containerfile | |
| push: true | |
| build-args: | | |
| VERSION=${{ steps.version.outputs.version }} | |
| tags: | | |
| harbor.nbis.se/sda/bpctl:${{ steps.version.outputs.version }} | |
| harbor.nbis.se/sda/bpctl:latest |