Skip to content

Commit

Permalink
Docker images CI was changed (#69)
Browse files Browse the repository at this point in the history
* Docker images CI was changed
  • Loading branch information
kogeler authored Jul 13, 2024
1 parent b3016e6 commit 8d261e0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
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

0 comments on commit 8d261e0

Please sign in to comment.