From 3d2a5d4e5f10830377026769762c823f5b40a1d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Baranowski?= Date: Wed, 13 Sep 2023 13:11:17 +0200 Subject: [PATCH] build: Add a workflow to build artifacts for 2.5 branch (#1587) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MikoĊ‚aj Baranowski --- .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 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 0000000000..4123f6ed68 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Release + +on: + push: + tags: + - 'v*' + +permissions: + contents: read + id-token: write + +jobs: + release: + name: Release + runs-on: + - self-hosted + - medium + steps: + - name: Checkout code + uses: actions/checkout@v3 + - uses: webfactory/ssh-agent@v0.7.0 + with: + ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} + + - name: Install asdf & tools + uses: asdf-vm/actions/install@v2 + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/kommander-applications + aws-region: us-west-2 + + - name: Extract tag name + shell: bash + run: echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + - name: make release + env: + DOCKER_USERNAME: ${{ secrets.NEXUS_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + GIT_TAG: ${{ env.GIT_TAG }} + run: make release