Skip to content

Commit

Permalink
Change env to UPSTREAM_BRANCH for clarity
Browse files Browse the repository at this point in the history
- Change env to UPSTREAM_BRANCH for clarity
- Replace hardcoded 'main' with UPSTREAM_BRANCH variable
  • Loading branch information
TheEvilSkeleton committed Sep 16, 2021
1 parent 6054d71 commit 34785f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
IMAGE_TAG: # Tag of image
FLATPAK_BUNDLE: # Name of bundle (excl. .flatpak)
FLATPAK_BRANCH: # Flatpak branch
MAIN_BRANCH: main # main branch (change if needed)
UPSTREAM_BRANCH: main # Upstream branch (change if needed)
FLATPAK_BUILD_DIR: build-dir
FLATPAK_BUILD_REPO: build-repo

Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
path: ${{ env.FLATPAK_BUNDLE }}.flatpak

publish-oci:
if: github.ref == 'refs/heads/${MAIN_BRANCH}'
if: github.ref == 'refs/heads/${UPSTREAM_BRANCH}'
runs-on: ubuntu-latest
needs: build

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
MANIFEST_PATH: # Path to manifest
MAIN_BRANCH: main # main branch (change if needed)
UPSTREAM_BRANCH: main # Upstream branch (change if needed)
REPO: # link to project repository (optional)

jobs:
Expand All @@ -26,8 +26,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: |
set -x
git clone -b ${MAIN_BRANCH} https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git ${MAIN_BRANCH}
cd ${MAIN_BRANCH}
git clone -b ${UPSTREAM_BRANCH} https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git ${UPSTREAM_BRANCH}
cd ${UPSTREAM_BRANCH}
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
/app/flatpak-external-data-checker --update --commit-only ${MANIFEST_PATH}
Expand All @@ -36,5 +36,5 @@ jobs:
continue-on-error: true
run: |
set -x
cd main
git push origin HEAD:${MAIN_BRANCH}
cd ${UPSTREAM_BRANCH}
git push origin HEAD:${UPSTREAM_BRANCH}

0 comments on commit 34785f3

Please sign in to comment.