Skip to content

Stage opensc-pkcs11.so. #7

Stage opensc-pkcs11.so.

Stage opensc-pkcs11.so. #7

# Copyright (C) 2022 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
name: Request a launchpad code import
on:
# Run whenever a new revision is pushed to any branch.
push:
# Allow running manually, for testing purposes.
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
launchpad-code-import:
runs-on: ubuntu-20.04
steps:
- name: Install script dependencies
run: sudo apt update && sudo apt install coreutils curl openssl
- name: Request a Launchpad code import
# The OAuth token and secret should be generated and stored as github
# secrets for a given Launchpad user, following the instructions at
# https://help.launchpad.net/API/SigningRequests
run: |
url="https://api.launchpad.net/devel/~mozilla-snaps/firefox-snap/+git/firefox-snap/+code-import"
curl -i -X POST -H "Authorization: OAuth realm=\"https://api.launchpad.net/\",oauth_consumer_key=\"firefox-snap\",oauth_token=\"${{ secrets.LP_OAUTH_TOKEN }}\",oauth_signature_method=\"PLAINTEXT\",oauth_signature=\"%26${{ secrets.LP_OAUTH_TOKEN_SECRET }}\",oauth_timestamp=\"$(date +%s)\",oauth_nonce=\"$(openssl rand -base64 12)\",oauth_version=\"1.0\"" -d "ws.op=requestImport" "$url"