Merge pull request #354 from kthcloud/main #79
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 deploy to cloud.cbh.kth.se | |
| on: | |
| push: | |
| branches: | |
| - "release" | |
| workflow_dispatch: | |
| jobs: | |
| kthcloud-ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set release env | |
| run: echo "RELEASE_DATE=$( date '+%F_%H:%M' )" >> $GITHUB_ENV | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: registry.cloud.cbh.kth.se | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| push: true | |
| tags: ${{ secrets.DOCKER_TAG }} | |
| build-args: | | |
| "RELEASE_BRANCH=release" | |
| "RELEASE_DATE=${{ env.RELEASE_DATE }}" | |
| "RELEASE_COMMIT=${{ github.sha }}" |