Skip to content

Commit

Permalink
Download compose config with new pose
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsarm committed Apr 24, 2024
1 parent 1b3f7cc commit 2950c2b
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,31 @@ jobs:
if: ${{ github.ref != 'refs/heads/master' }}
run: docker push "mrsarm/django-coleman:${GITHUB_REF_SLUG}"

- name: Get GitHub downloader
run: wget https://gist.github.com/mrsarm/95279381f3d8bf4269499fb437888e2c/raw/github-file.sh
- name: Download pose
run: wget https://github.com/mrsarm/pose/releases/download/0.4.0-b5/pose-0.4.0-b5-x86_64-unknown-linux-gnu.tar.gz
- name: Unpack pose
run: tar -xvf pose*.tar.gz
- name: Get compose.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash ./github-file.sh compose.yaml mrsarm/dcoleman-e2e $GITHUB_REF_SLUG main $GITHUB_TOKEN
run: |
./pose get -H "Authorization: token $GITHUB_TOKEN" \
"https://raw.githubusercontent.com/mrsarm/dcoleman-e2e/$GITHUB_REF_SLUG/compose.yaml" \
"$GITHUB_REF_SLUG:main"
- name: Get .env.example
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash ./github-file.sh .env.example mrsarm/dcoleman-e2e $GITHUB_REF_SLUG main $GITHUB_TOKEN
run: |
./pose get -H "Authorization: token $GITHUB_TOKEN" \
"https://raw.githubusercontent.com/mrsarm/dcoleman-e2e/$GITHUB_REF_SLUG/.env.example" \
"$GITHUB_REF_SLUG:main"
- name: Setup environment variables
run: cp .env.example .env
- name: Download pose
if: ${{ github.ref != 'refs/heads/master' }}
run: wget https://github.com/mrsarm/pose/releases/download/0.4.0-b4/pose-0.4.0-b4-x86_64-unknown-linux-gnu.tar.gz
- name: Unpack pose
if: ${{ github.ref != 'refs/heads/master' }}
run: tar -xvf pose*.tar.gz
- name: Build compose file for CI with pose
if: ${{ github.ref != 'refs/heads/master' }}
run: ./pose --no-docker config --tag "${GITHUB_REF_SLUG}" --tag-filter regex=mrsarm/ --progress -o ci.yaml
run: |
./pose --no-docker config --tag "${GITHUB_REF_SLUG}" --tag-filter regex=mrsarm/ --progress -o ci.yaml
- name: Create compose file for CI without pose
if: ${{ github.ref == 'refs/heads/master' }}
run: cp compose.yaml ci.yaml
Expand Down

0 comments on commit 2950c2b

Please sign in to comment.