Skip to content

curl api .http

curl api .http #4

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Curl api with GITHUB_TOKEN in action
on:
push:
branches: [ "curl-api" ]
jobs:
curl-api-test:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
# - name: Create issue using REST API
# run: |
# curl --request POST \
# --url https://api.github.com/repos/${{ github.repository }}/issues \
# --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
# --header 'content-type: application/json' \
# --data '{
# "title": "Automated issue for commit: ${{ github.sha }}",
# "body": "This issue was automatically created by the GitHub Action workflow **${{ github.workflow }}**. \n\n The commit hash was: _${{ github.sha }}_."
# }' \
# --fail
- name: list packages
run: |
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }} " \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/user/packages?package_type=maven"
- name: get Package
run: |
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/users/slow-groovin/packages/maven/com.github.action.test.github-package-upload-config