Skip to content

Commit

Permalink
Separate action to build single-arch docker image for github packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
miigotu committed Jul 3, 2020
1 parent 27df1a8 commit 390ae70
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}
run: |
echo "${GITHUB_PASSWORD}" | docker login --username "${GITHUB_USERNAME}" --password-stdin docker.pkg.github.com
# echo "${GITHUB_PASSWORD}" | docker login --username "${GITHUB_USERNAME}" --password-stdin docker.pkg.github.com
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin docker.io
echo ::set-output name=buildx::$(echo docker buildx build --output type=image,push=true \
--platform ${{ steps.prepare.outputs.docker_platforms }} --cache-from "type=local,src=/tmp/.buildx-cache" --cache-to "type=local,dest=/tmp/.buildx-cache" \
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/github_pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish Docker Image to GitHub
on:
push:
branches:
- "submodules"
- "master"

jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
fetch-depth: 1
persist-credentials: false
submodules: recursive
- name: Checkout submodules
uses: textbook/git-checkout-submodule-action@master
with:
remote: true
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: miigotu/ps3toolchain/ps3dev
tag_with_ref: true

0 comments on commit 390ae70

Please sign in to comment.