diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..8cc4b90 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,35 @@ +name: publish + +on: + release: + types: + - published + +jobs: + image: + runs-on: ubuntu-latest + steps: + - name: Checkout project + uses: actions/checkout@v3.3.0 + + - name: Authenticate with Quay.io + uses: docker/login-action@v2.2.0 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_ROBOT_TOKEN }} + + - name: Generate image tag + id: image_tag + run: | + echo tag=$(echo ${{ github.event.release.tag_name }} | sed 's/^v//') >> $GITHUB_OUTPUT + + - name: Build image + uses: docker/build-push-action@v4.1.1 + with: + context: . + file: Dockerfile + push: true + tags: | + quay.io/tadas/rally-exporter:latest + quay.io/tadas/rally-exporter:${{ steps.image_tag.outputs.tag }}