diff options
author | Lukas Larsson <lukas@erlang.org> | 2022-10-17 16:22:27 +0200 |
---|---|---|
committer | Lukas Larsson <lukas@erlang.org> | 2022-10-17 20:58:55 +0200 |
commit | 7241bbd57363e97d529f401be56036476c43aad9 (patch) | |
tree | eda9562cee1f6a0b6f57d6af6250f37847f94d15 /.github/workflows | |
parent | be6f05d34736fadf37328058f00e788cb88da61b (diff) | |
download | erlang-7241bbd57363e97d529f401be56036476c43aad9.tar.gz |
Push versions of all branches
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/main.yaml | 15 | ||||
-rw-r--r-- | .github/workflows/update-base.yaml | 21 |
2 files changed, 24 insertions, 12 deletions
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index e77515e4fb..ce50c86a1e 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -20,6 +20,9 @@ on: push: pull_request: +env: + BASE_BRANCH: ${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }} + jobs: pack: @@ -44,7 +47,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build BASE image id: base-build - run: .github/scripts/build-base-image.sh 64-bit + run: .github/scripts/build-base-image.sh "${BASE_BRANCH}" 64-bit - name: Save BASE image if: steps.base-build.outputs.BASE_BUILD == 're-built' uses: actions/upload-artifact@v2 @@ -297,7 +300,7 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build base image - run: .github/scripts/build-base-image.sh ${{ matrix.type }} + run: .github/scripts/build-base-image.sh "${BASE_BRANCH}" ${{ matrix.type }} - name: Build ${{ matrix.type }} image run: | mv otp_src.tar.gz .github/otp.tar.gz @@ -327,7 +330,7 @@ jobs: with: name: otp-ubuntu-20.04 - name: Restore docker image - run: .github/scripts/restore-otp-image.sh + run: .github/scripts/restore-otp-image.sh "${BASE_BRANCH}" ## Build pre-built tar with chunks - name: Build doc chunks @@ -400,7 +403,7 @@ jobs: with: name: otp-ubuntu-20.04 - name: Restore docker image - run: .github/scripts/restore-otp-image.sh + run: .github/scripts/restore-otp-image.sh "${BASE_BRANCH}" - name: Install clang-format run: | docker build -t otp - <<EOF @@ -444,7 +447,7 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Restore docker image - run: .github/scripts/restore-otp-image.sh + run: .github/scripts/restore-otp-image.sh "${BASE_BRANCH}" - name: Run tests id: run-tests run: | @@ -499,7 +502,7 @@ jobs: uses: actions/download-artifact@v2 - run: mv otp-ubuntu-20.04/otp-ubuntu-20.04.tar.gz . - name: Restore docker image - run: .github/scripts/restore-otp-image.sh + run: .github/scripts/restore-otp-image.sh "${BASE_BRANCH}" - name: Merge test results run: | shopt -s nullglob diff --git a/.github/workflows/update-base.yaml b/.github/workflows/update-base.yaml index 7e3ec2bc89..f043fab039 100644 --- a/.github/workflows/update-base.yaml +++ b/.github/workflows/update-base.yaml @@ -18,11 +18,14 @@ jobs: strategy: matrix: type: [debian-base,ubuntu-base,i386-debian-base] + branch: [master, maint, maint-25] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + with: + ref: ${{ matrix.branch }} - name: Docker login - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: docker.pkg.github.com username: ${{ github.actor }} @@ -30,8 +33,14 @@ jobs: - name: Build base image id: base run: >- - BASE_TAG=docker.pkg.github.com/erlang/otp/${{ matrix.type }} + BASE_TAG=docker.pkg.github.com/${{ github.repository_owner }}/otp/${{ matrix.type }} BASE_USE_CACHE=false - .github/scripts/build-base-image.sh - - name: Push base image - run: docker push ${{ steps.base.outputs.BASE_TAG }} + .github/scripts/build-base-image.sh "${{ matrix.branch }}" + - name: Push master image + if: matrix.branch == 'master' + run: docker push ${{ steps.base.outputs.BASE_TAG }}:latest + - name: Tag and push base image + run: | + docker tag ${{ steps.base.outputs.BASE_TAG }}:latest \ + ${{ steps.base.outputs.BASE_TAG }}:${{ matrix.branch }} + docker push ${{ steps.base.outputs.BASE_TAG }}:${{ matrix.branch }} |