This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
Update from python_toolbox
to openfast_toolbox
#4
Workflow file for this run
This file contains 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
# This workflow releases a new version of the package and builds and pushes a new docker image. | |
name: Release | |
# Only trigger when a pull request into main branch is merged. | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Get package version | |
run: echo "PACKAGE_VERSION=$(poetry version -s)" >> $GITHUB_ENV | |
- name: Create Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, no need to create your own. | |
with: | |
tag_name: ${{ env.PACKAGE_VERSION }} | |
release_name: ${{ github.event.pull_request.title }} | |
body: ${{ github.event.pull_request.body }} | |
draft: false | |
prerelease: false | |
docker: | |
runs-on: ubuntu-latest | |
needs: release | |
timeout-minutes: 300 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Get package version | |
run: echo "PACKAGE_VERSION=$(poetry version -s)" >> $GITHUB_ENV | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/[email protected] | |
with: | |
context: . | |
push: true | |
platforms: linux/amd64 | |
tags: octue/openfast:${{ env.PACKAGE_VERSION }},octue/openfast:latest |