v1.14.0 #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate skopeo packages | |
on: | |
release: | |
types: | |
- created | |
env: | |
REPOSITORY_NAME: ${{ github.repository }} | |
TAG_NAME: ${{ github.ref_name }} | |
concurrency: | |
group: publish.${{ github.ref || github.run_id }}.${{ github.event_name }} | |
cancel-in-progress: true | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current repository | |
uses: actions/checkout@v4 | |
- name: Build skopeo | |
run: | | |
docker build -f Dockerfile -t skopeo-build . | |
docker run -v ./bin:/skopeo/bin -t skopeo-build | |
shell: bash | |
- name: Upload release attachment | |
env: | |
GH_TOKEN: ${{ github.token }} | |
BIN_DIR: "./bin" | |
run: | | |
gh release upload ${{ github.ref_name }} ${BIN_DIR}/skopeo.linux.amd64 #skopeo.linux.amd64 | |
gh release upload ${{ github.ref_name }} ${BIN_DIR}/skopeo.linux.arm64 #skopeo.linux.arm64 | |
gh release upload ${{ github.ref_name }} ${BIN_DIR}/skopeo.darwin.amd64 #skopeo.darwin.amd64 | |
gh release upload ${{ github.ref_name }} ${BIN_DIR}/skopeo.darwin.arm64 #skopeo.darwin.arm64 | |
gh release upload ${{ github.ref_name }} ${BIN_DIR}/skopeo.windows.amd64.exe #skopeo.windows.amd64.exe | |
gh release upload ${{ github.ref_name }} ${BIN_DIR}/skopeo.windows.arm64.exe #skopeo.windows.arm64.exe | |
shell: bash | |
# - name: Upload release attachment | |
# uses: actions/github-script@v4 | |
# with: | |
# script: | | |
# const fs = require('fs'); | |
# const tag = context.ref.replace("refs/tags/", ""); | |
# // Get release for this tag | |
# const release = await github.repos.getReleaseByTag({ | |
# owner: context.repo.owner, | |
# repo: context.repo.repo, | |
# tag | |
# }); | |
# // Upload the release asset | |
# await github.repos.uploadReleaseAsset({ | |
# owner: context.repo.owner, | |
# repo: context.repo.repo, | |
# release_id: release.data.id, | |
# name: "skopeo.linux.amd64", | |
# data: await fs.readFileSync("bin/skopeo.linux.amd64") | |
# }); | |
# await github.repos.uploadReleaseAsset({ | |
# owner: context.repo.owner, | |
# repo: context.repo.repo, | |
# release_id: release.data.id, | |
# name: "skopeo.linux.arm64", | |
# data: await fs.readFileSync("bin/skopeo.linux.arm64") | |
# }); | |
# await github.repos.uploadReleaseAsset({ | |
# owner: context.repo.owner, | |
# repo: context.repo.repo, | |
# release_id: release.data.id, | |
# name: "skopeo.darwin.amd64", | |
# data: await fs.readFileSync("bin/skopeo.darwin.amd64") | |
# }); | |
# await github.repos.uploadReleaseAsset({ | |
# owner: context.repo.owner, | |
# repo: context.repo.repo, | |
# release_id: release.data.id, | |
# name: "skopeo.darwin.arm64", | |
# data: await fs.readFileSync("bin/skopeo.darwin.arm64") | |
# }); | |
# await github.repos.uploadReleaseAsset({ | |
# owner: context.repo.owner, | |
# repo: context.repo.repo, | |
# release_id: release.data.id, | |
# name: "skopeo.windows.amd64.exe", | |
# data: await fs.readFileSync("bin/skopeo.windows.amd64.exe") | |
# }); | |
# await github.repos.uploadReleaseAsset({ | |
# owner: context.repo.owner, | |
# repo: context.repo.repo, | |
# release_id: release.data.id, | |
# name: "skopeo.windows.arm64.exe", | |
# data: await fs.readFileSync("bin/skopeo.windows.arm64.exe") | |
# }); |