From 0ccdf3cdbf139c7b5a94a76965b1b74c2953783e Mon Sep 17 00:00:00 2001 From: Yogesh Ojha Date: Thu, 26 Aug 2021 14:17:05 +0530 Subject: [PATCH] Fixed github actions --- .github/workflows/build-pr.yml | 6 ++--- .github/workflows/build.yml | 38 +++++++++++++-------------- .github/workflows/codeql-analysis.yml | 32 ++-------------------- 3 files changed, 24 insertions(+), 52 deletions(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 9b9d667b..097399af 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout the git repo uses: actions/checkout@v2 - + - name: Log in to Docker Hub uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: @@ -23,8 +23,8 @@ jobs: uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: images: yogeshojha/rengine - - - name: Build and push Docker image + + - name: Build Docker image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: . diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ae5ad1b..6f519543 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,11 +1,8 @@ -name: Build and publish Docker image +name: 🚀 Build Docker image on: push: - branches: [ master ] - -env: - IMAGE_NAME: rengine + branches: [ master] jobs: build: @@ -15,19 +12,22 @@ jobs: - name: Checkout the git repo uses: actions/checkout@v2 - - name: Set Docker image name - run: | - echo "IMAGE_ID=$(echo -n '${{ github.repository }}/${{ env.IMAGE_NAME }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV - - - name: Build and push Docker images - uses: docker/build-push-action@v1 + - name: Log in to Docker Hub + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: - username: ${{ github.actor }} - password: ${{ github.token }} - registry: docker.pkg.github.com - repository: ${{ env.IMAGE_ID }} - push: true - tag_with_ref: true - tag_with_sha: true - add_git_labels: true + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: yogeshojha/rengine + + - name: Build Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f25942ad..c016a241 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,15 +1,4 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" +name: "đŸ’ģ Checking Code Quality" on: push: @@ -28,7 +17,7 @@ jobs: fail-fast: false matrix: language: [ 'javascript', 'python' ] - + steps: - name: Checkout repository uses: actions/checkout@v2 @@ -38,26 +27,9 @@ jobs: uses: github/codeql-action/init@v1 with: languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild uses: github/codeql-action/autobuild@v1 - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1