diff --git a/.github/workflows/devDocker.yml b/.github/workflows/devDocker.yml new file mode 100644 index 0000000..521f02f --- /dev/null +++ b/.github/workflows/devDocker.yml @@ -0,0 +1,22 @@ +name: Publish Dev Docker +on: + push: + branches: + - 'dev' +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Workflow run cleanup action + uses: rokroskar/workflow-run-cleanup-action@v0.2.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@master + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: denbicloud/os_project_usage_exporter + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + dockerfile: Dockerfile + tags: "dev" diff --git a/.github/workflows/releaseDocker.yml b/.github/workflows/releaseDocker.yml new file mode 100644 index 0000000..e0c312b --- /dev/null +++ b/.github/workflows/releaseDocker.yml @@ -0,0 +1,22 @@ +name: Create Release Image +on: + push: + tags: + - '*' +jobs: + build_release: + runs-on: ubuntu-latest + + steps: + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} + - uses: actions/checkout@master + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: denbicloud/os_project_usage_exporter + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + dockerfile: Dockerfile + tags: ${{ steps.get_version.outputs.VERSION }}