From 70c8416e5c28a36d68c67b658dee185a869b2264 Mon Sep 17 00:00:00 2001 From: Andrew Maddaford Date: Tue, 20 Apr 2021 10:53:15 +0100 Subject: [PATCH] Add release Github action (#92) --- .github/workflows/release.yml | 20 ++++++++++++++++++++ 1 file changed, 20 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 00000000..a94e7b80 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,20 @@ +name: Release + +on: + release: + types: [published] + +jobs: + docker-push: + runs-on: ubuntu-latest + env: + TAG: ${{ github.event.release.tag_name }} + steps: + - uses: actions/checkout@v2 + - name: Build + run: docker build -t onsdigital/eq-questionnaire-validator:$TAG . + - name: Push + run: | + echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin + echo "Pushing with tag [$TAG]" + docker push onsdigital/eq-questionnaire-validator:$TAG \ No newline at end of file