Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker images CI was changed #69

Merged
merged 5 commits into from
Jul 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .github/workflows/tags.yml → .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Build and push tag as Docker image
name: Build and push Docker images

on:
push:
branches:
- master
- dev
tags:
- 'v*'

Expand All @@ -22,10 +25,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set environmental variables
id: env-vars
run: |
echo "FULL_IMAGE_NAME=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}-node-js-${{ matrix.node-js-image-version }}-subql-node-${{ matrix.subql-node-image-version }}" >> "$GITHUB_ENV"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand All @@ -41,6 +40,17 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Set image label for the master branch
if: ${{ github.ref_type == 'branch' && github.ref_name == 'master' }}
run: |
echo "IMAGE_LABEL=latest" >> "$GITHUB_ENV"
- name: Set image label for a tag or other branches
if: ${{ github.ref_type == 'tag' || (github.ref_type == 'branch' && github.ref_name != 'master') }}
run: |
echo "IMAGE_LABEL=${{ github.ref_name }}" >> "$GITHUB_ENV"
- name: Set full name of the Docker image
run: |
echo "FULL_IMAGE_NAME=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_LABEL }}-node-js-${{ matrix.node-js-image-version }}-subql-node-${{ matrix.subql-node-image-version }}" >> "$GITHUB_ENV"
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: PR
name: PR check
on:
pull_request:
paths-ignore:
- ".github/workflows/**"

jobs:
pr:
name: pr
name: build project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
- run: yarn
node-version: 20
- name: Install
run: yarn install
- name: Codegen
run: yarn codegen
- name: Build
Expand Down