From 49d83d1f73604fb45f4816020a4d7115196419a6 Mon Sep 17 00:00:00 2001 From: Eran Cohen Date: Tue, 16 Jun 2020 16:00:53 +0300 Subject: [PATCH] MGMT-1161 Added release workflow for new git tags --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2923616 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: build + +on: + push: + tags: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v1 + - name: Get release version + id: get_version + run: echo ::set-env name=GIT_REVISION::$(echo ${GITHUB_SHA}) + - name: Get the tag + id: get_tag + run: echo ::set-env name=GIT_TAG::${GITHUB_REF/refs\/tags\//} + - name: Publish image to Registry + uses: elgohr/Publish-Docker-Github-Action@2.15 + with: + name: ignition-manifests-and-kubeconfig-generate + username: ${{ secrets.OCPMETAL_USERNAME }} + password: ${{ secrets.OCPMETAL_PASSWORD }} + REGISTRY: 'quay.io/ocpmetal' + dockerfile: Dockerfile.baremetal + buildargs: GIT_REVISION + tags: "${{ env.GIT_TAG }},${{ env.GIT_REVISION }}"