Skip to content

Commit

Permalink
CI: Fix docker release builds
Browse files Browse the repository at this point in the history
Because the docker images we use to build are now too old to run
the marketplace actions themselves, we have to run these outside
of docker and then docker exec to do the build process.
  • Loading branch information
cookpa committed May 17, 2024
1 parent cda919b commit 3fa6cfb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/release-docker-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,17 @@ jobs:
with:
ref: ${{ github.ref }}

- name: Get ANTs version
- name: Get ANTs version and set artifact name
run: |
echo "ANTS_VERSION=${ANTS_TAG#v}" >> $GITHUB_ENV
echo "ARTIFACT=ants-${ANTS_TAG}-${{ matrix.config.os }}-${{ runner.arch }}-${{ matrix.config.cc }}.zip" >> $GITHUB_ENV
env:
ANTS_TAG: ${{ github.ref_name }}

- name: Set up build container
run: |
docker pull ${{ matrix.config.image }}
docker create --name build_container -v ${{ github.workspace }}:/workspace ${{ matrix.config.image }} sleep infinity
docker create --name build_container -v ${{ github.workspace }}:/workspace -v ${{ runner.temp }}/artifact:/artifact ${{ matrix.config.image }} sleep infinity
docker start build_container
- name: Install dependencies on Centos
if: startsWith(matrix.config.name, 'Centos7')
Expand Down Expand Up @@ -116,15 +117,15 @@ jobs:
run: |
docker exec --user root build_container bash -c "
cd /workspace/install
zip -r /workspace/${{ env.ARTIFACT }} .
zip -r /artifact/${{ env.ARTIFACT }} .
"
- name: Upload release asset
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
artifacts: "${{ env.ARTIFACT }}"
artifacts: "${{ runner.temp }}/artifact/${{ env.ARTIFACT }}"
artifactContentType: application/zip
token: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit 3fa6cfb

Please sign in to comment.