Skip to content

Commit

Permalink
.github/workflows/build.yml: specify version tag
Browse files Browse the repository at this point in the history
Before RIOT_BRANCH was used as a tag reference but this tags the
previous release, so add a new environment variable.
  • Loading branch information
fjmolinas committed Jun 8, 2021
1 parent 9e26c74 commit d62ebd6
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ jobs:
name: Build and Test
runs-on: ubuntu-latest
env:
RIOT_BRANCH: '2021.01'
RIOT_BRANCH: '2021.04-branch'
VERSION_TAG: '2021.07'
DOCKER_REGISTRY: "${{ secrets.DOCKER_REGISTRY || 'local' }}"

steps:
Expand All @@ -52,15 +53,15 @@ jobs:
context: ./riotdocker-base
tags: |
${{ env.DOCKER_REGISTRY }}/riotdocker-base:latest
${{ env.DOCKER_REGISTRY }}/riotdocker-base:${{ env.RIOT_BRANCH }}
${{ env.DOCKER_REGISTRY }}/riotdocker-base:${{ env.VERSION_TAG }}
- name: Build static-test-tools
uses: docker/build-push-action@v2
with:
context: ./static-test-tools
tags: |
${{ env.DOCKER_REGISTRY }}/static-test-tools:latest
${{ env.DOCKER_REGISTRY }}/static-test-tools:${{ env.RIOT_BRANCH }}
${{ env.DOCKER_REGISTRY }}/static-test-tools:${{ env.VERSION_TAG }}
build-args: |
DOCKER_REGISTRY=${{ env.DOCKER_REGISTRY }}
Expand All @@ -76,7 +77,7 @@ jobs:
context: ./riotbuild
tags: |
${{ env.DOCKER_REGISTRY }}/riotbuild:latest
${{ env.DOCKER_REGISTRY }}/riotbuild:${{ env.RIOT_BRANCH }}
${{ env.DOCKER_REGISTRY }}/riotbuild:${{ env.VERSION_TAG }}
build-args: |
DOCKER_REGISTRY=${{ env.DOCKER_REGISTRY }}
RIOTBUILD_BRANCH=${{ env.RIOTBUILD_BRANCH }}
Expand All @@ -87,7 +88,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: RIOT-OS/RIOT
ref: ${{ env.RIOT_BRANCH }}-branch
ref: ${{ env.RIOT_BRANCH }}
path: RIOT

- name: GNU build test
Expand All @@ -110,7 +111,7 @@ jobs:
- name: Run static tests
run: |
docker run --rm -t -v $(pwd)/RIOT:/data/riotbuild \
-e CI_BASE_BRANCH=${{ env.RIOT_BRANCH }}-branch ${{ env.DOCKER_REGISTRY }}/riotbuild:latest \
-e CI_BASE_BRANCH=${{ env.RIOT_BRANCH }} ${{ env.DOCKER_REGISTRY }}/riotbuild:latest \
./dist/tools/ci/static_tests.sh
- name: Login to DockerHub
Expand All @@ -124,8 +125,8 @@ jobs:
if: "${{ github.ref == 'refs/heads/master' }}"
run: |
docker image push ${{ env.DOCKER_REGISTRY }}/riotdocker-base:latest
docker image push ${{ env.DOCKER_REGISTRY }}/riotdocker-base:${{ env.RIOT_BRANCH }}
docker image push ${{ env.DOCKER_REGISTRY }}/riotdocker-base:${{ env.VERSION_TAG }}
docker image push ${{ env.DOCKER_REGISTRY }}/static-test-tools:latest
docker image push ${{ env.DOCKER_REGISTRY }}/static-test-tools:${{ env.RIOT_BRANCH }}
docker image push ${{ env.DOCKER_REGISTRY }}/static-test-tools:${{ env.VERSION_TAG }}
docker image push ${{ env.DOCKER_REGISTRY }}/riotbuild:latest
docker image push ${{ env.DOCKER_REGISTRY }}/riotbuild:${{ env.RIOT_BRANCH }}
docker image push ${{ env.DOCKER_REGISTRY }}/riotbuild:${{ env.VERSION_TAG }}

0 comments on commit d62ebd6

Please sign in to comment.