From 5408b2f60efe10f8330fa382fa029f016623c51c Mon Sep 17 00:00:00 2001 From: Jan Philip <33464395+jpwahle@users.noreply.github.com> Date: Wed, 13 Jul 2022 15:39:40 +0200 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 52 +++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 04c044d..bcbc328 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,25 +10,31 @@ jobs: Release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: 🏁 Checkout + uses: actions/checkout@v2 with: persist-credentials: false fetch-depth: '0' - - uses: actions/setup-node@v2 + + - name: ✅ Setup node + uses: actions/setup-node@v2 with: node-version: '17' - - name: Bump version and push tag + + - name: 🏷 Bump version and push tag uses: anothrNick/github-tag-action@1.36.0 id: tagging env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} WITH_V: true - - name: Build Changelog + + - name: 📝 Build Changelog id: build_changelog uses: mikepenz/release-changelog-builder-action@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Create Release + + - name: 📦 Create Release uses: actions/create-release@v1 with: release_name: ${{steps.tagging.outputs.tag}} @@ -36,39 +42,57 @@ jobs: tag_name: ${{steps.tagging.outputs.tag}} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Update npm package version + + - name: ⬆️ Update npm package version uses: reedyuk/npm-version@1.1.1 with: version: ${{steps.tagging.outputs.tag}} - - name: Commit files + + - name: ➕ Commit files run: | git config --local user.email "jan.philip.wahle@gmail.com" git config --local user.name "github-actions[bot]" git add package.json git commit -m "[release-bot] Update npm version" - - name: Push changes + - name: 💨 Push changes uses: ad-m/github-push-action@master with: github_token: ${{ secrets.ACCESS_TOKEN }} branch: ${{ github.ref }} - - name: Set up QEMU + + - name: 🐳 Set up QEMU uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx + + - name: 🐳 Set up Docker Buildx uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub + + - name: 🔑 Login to DockerHub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push version + + - name: 🐳 Build and push version uses: docker/build-push-action@v2 with: context: . push: true tags: jpelhaw/nlp-land-frontend:${{steps.tagging.outputs.tag}} - - name: Build and push latest + + - name: 🐳 Build and push latest uses: docker/build-push-action@v2 with: context: . push: true - tags: jpelhaw/nlp-land-frontend:latest \ No newline at end of file + tags: jpelhaw/nlp-land-frontend:latest + + - name: 🔑 Docker GitHub package login + run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} + + - name: 🐳 Build docker image + run: docker build -t ghcr.io/gipplab/cs-insights-frontend:${{steps.tagging.outputs.tag}} -t ghcr.io/gipplab/cs-insights-frontend:latest . + + - name: 📦 Push docker image + run: | + docker push ghcr.io/gipplab/cs-insights-frontend:${{steps.tagging.outputs.tag}} + docker push ghcr.io/gipplab/cs-insights-frontend:latest