From 390ae70b8cd8264a90535c999e9cc3e4809d34b2 Mon Sep 17 00:00:00 2001 From: miigotu Date: Fri, 3 Jul 2020 03:18:59 -0400 Subject: [PATCH] Separate action to build single-arch docker image for github packages. --- .github/workflows/deploy.yaml | 2 +- .github/workflows/github_pkg.yaml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/github_pkg.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index b3b64bb87..fe91248ab 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -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" \ diff --git a/.github/workflows/github_pkg.yaml b/.github/workflows/github_pkg.yaml new file mode 100644 index 000000000..e445988df --- /dev/null +++ b/.github/workflows/github_pkg.yaml @@ -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 \ No newline at end of file