Skip to content

Commit

Permalink
chore: conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaitos committed Oct 22, 2024
2 parents b183f92 + 2b963f5 commit fc18dab
Show file tree
Hide file tree
Showing 10 changed files with 2,784 additions and 2,501 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

# Keep GitHub Actions up to date with GitHub's Dependabot...
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
day: "monday"
- package-ecosystem: github-actions
directory: /
groups:
github-actions:
patterns:
- "*" # Group all Actions updates into a single larger pull request
schedule:
interval: weekly
day: monday
1 change: 0 additions & 1 deletion .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
# - run: npm run build
- uses: ./
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
channelId: live
projectId: action-hosting-deploy-demo
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
build_and_preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
# Add any build steps here. For example:
# - run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
Expand Down Expand Up @@ -73,12 +73,11 @@ jobs:
deploy_live_website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
# Add any build steps here. For example:
# - run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
projectId: your-Firebase-project-ID
channelId: live
Expand Down Expand Up @@ -148,6 +147,10 @@ file relative to the root of your repository. Defaults to `.` (the root of your

The version of `firebase-tools` to use. If not specified, defaults to `latest`.

### `disableComment` _{boolean}_

Disable commenting in a PR with the preview URL.

## Outputs

Values emitted by this action that can be consumed by other actions later in your workflow
Expand All @@ -158,7 +161,11 @@ The url(s) deployed to

### `expire_time`

The time the deployed preview urls expire
The time the deployed preview urls expire, example: 2024-04-10T14:37:53.817800922Z

### `expire_time_formatted`

The time the deployed preview urls expire in the UTC format, example: Tue, 09 Apr 2024 18:24:42 GMT

### `details_url`

Expand Down
7 changes: 7 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,17 @@ inputs:
The version of firebase-tools to use. Defaults to `latest`.
default: latest
required: false
disableComment:
description: >-
Disable auto-commenting with the preview channel URL to the pull request
default: "false"
required: false
outputs:
urls:
description: The url(s) deployed to
expire_time:
description: The time the deployed preview urls expire
expire_time_formatted:
description: The time the deployed preview urls expire in the UTC format
details_url:
description: A single URL that was deployed to
14 changes: 10 additions & 4 deletions bin/action.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -92934,9 +92934,11 @@ exports.getExecOutput = getExecOutput;
function interpretChannelDeployResult(deployResult) {
const allSiteResults = Object.values(deployResult.result);
const expireTime = allSiteResults[0].expireTime;
const expire_time_formatted = new Date(expireTime).toUTCString();
const urls = allSiteResults.map(siteResult => siteResult.url);
return {
expireTime,
expire_time_formatted,
urls
};
}
Expand Down Expand Up @@ -93091,14 +93093,14 @@ function getChannelDeploySuccessComment(result, commit) {
const deploySignature = createDeploySignature(result);
const urlList = getURLsMarkdownFromChannelDeployResult(result);
const {
expireTime
expire_time_formatted
} = interpretChannelDeployResult(result);
return `
Visit the preview URL for this PR (updated for commit ${commit}):

${urlList}

<sub>(expires ${new Date(expireTime).toUTCString()})</sub>
<sub>(expires ${expire_time_formatted})</sub>

${BOT_SIGNATURE}

Expand Down Expand Up @@ -93179,6 +93181,7 @@ const octokit = token ? github.getOctokit(token) : undefined;
const entryPoint = core.getInput("entryPoint");
const target = core.getInput("target");
const firebaseToolsVersion = core.getInput("firebaseToolsVersion");
const disableComment = core.getInput("disableComment");
async function run() {
const isPullRequest = !!github.context.payload.pull_request;
let finish = details => console.log(details);
Expand Down Expand Up @@ -93243,13 +93246,16 @@ async function run() {
core.endGroup();
const {
expireTime,
expire_time_formatted,
urls
} = interpretChannelDeployResult(deployment);
core.setOutput("urls", urls);
core.setOutput("expire_time", expireTime);
core.setOutput("expire_time_formatted", expire_time_formatted);
core.setOutput("details_url", urls[0]);
const urlsListMarkdown = urls.length === 1 ? `[${urls[0]}](${urls[0]})` : urls.map(url => `- [${url}](${url})`).join("\n");
if (token && isPullRequest && !!octokit) {
if (disableComment === "true") {
console.log(`Commenting on PR is disabled with "disableComment: ${disableComment}"`);
} else if (token && isPullRequest && !!octokit) {
var _context$payload$pull;
const commitId = (_context$payload$pull = github.context.payload.pull_request) == null ? void 0 : _context$payload$pull.head.sha.substring(0, 7);
await postChannelSuccessComment(octokit, github.context, deployment, commitId);
Expand Down
Loading

0 comments on commit fc18dab

Please sign in to comment.