Skip to content

Commit

Permalink
Hard code 'main'
Browse files Browse the repository at this point in the history
GitHub does not allow environments in tenors in conditions, causing `publish-oci` to get skipped

Closes #2
  • Loading branch information
TheEvilSkeleton committed Sep 17, 2021
1 parent 34785f3 commit f301b72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Flatpak
on:
push:
branches:
- main # (change if needed)
- main
workflow_dispatch:

env:
Expand All @@ -14,7 +14,6 @@ env:
IMAGE_TAG: # Tag of image
FLATPAK_BUNDLE: # Name of bundle (excl. .flatpak)
FLATPAK_BRANCH: # Flatpak branch
UPSTREAM_BRANCH: main # Upstream branch (change if needed)
FLATPAK_BUILD_DIR: build-dir
FLATPAK_BUILD_REPO: build-repo

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

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

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

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

jobs:
Expand All @@ -26,8 +25,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: |
set -x
git clone -b ${UPSTREAM_BRANCH} https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git ${UPSTREAM_BRANCH}
cd ${UPSTREAM_BRANCH}
git clone -b main https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git main
cd main
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 +35,5 @@ jobs:
continue-on-error: true
run: |
set -x
cd ${UPSTREAM_BRANCH}
git push origin HEAD:${UPSTREAM_BRANCH}
cd main
git push origin HEAD:main

0 comments on commit f301b72

Please sign in to comment.