diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..72f92b4 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,24 @@ +name: Publish to Docker Registry +on: + release: + types: [published] + push: + branches: + - master + schedule: + - cron: '0 2 * * 0' # Weekly on Sundays at 02:00 +jobs: + update: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Get release version + id: get_version + run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10}) + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: openclimatefix/metoffice_ec2 + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + tags: "latest,${{ env.RELEASE_VERSION }}"