From f301b723ae7f3d592148dab71ab8e90e15b5751c Mon Sep 17 00:00:00 2001 From: TheEvilSkeleton Date: Thu, 16 Sep 2021 23:10:47 -0400 Subject: [PATCH] Hard code 'main' GitHub does not allow environments in tenors in conditions, causing `publish-oci` to get skipped Closes https://github.com/TheEvilSkeleton/flatpak-remote/issues/2 --- .github/workflows/flatpak.yml | 5 ++--- .github/workflows/update.yml | 9 ++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index 2259148..c64d1e4 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -4,7 +4,7 @@ name: Flatpak on: push: branches: - - main # (change if needed) + - main workflow_dispatch: env: @@ -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 @@ -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 diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index c2a8e93..7675144 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -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: @@ -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} @@ -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