Skip to content

Commit

Permalink
test variables
Browse files Browse the repository at this point in the history
  • Loading branch information
feliciachang committed May 30, 2024
1 parent 1f74c5f commit b151202
Showing 1 changed file with 6 additions and 32 deletions.
38 changes: 6 additions & 32 deletions .github/actions/publish-to-jamsocket/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,10 @@ runs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set JAMCR_USER from token
- name: Debug Inputs
shell: bash
run: echo "JAMCR_USER=${{ inputs.JAMSOCKET_API_TOKEN%%.* }}" >> $GITHUB_ENV

- name: Set JAMCR_PASS from token
shell: bash
run: echo "JAMCR_PASS=${{ inputs.JAMSOCKET_API_TOKEN#*. }}" >> $GITHUB_ENV

- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.JAMCR_USER }}
password: ${{ env.JAMCR_PASS }}

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ inputs.IMAGE_NAME }}
tags: |
type=sha,enable=true,priority=100,prefix=sha-,suffix=,format=short
type=raw,value=latest
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: ${{ inputs.DOCKER_BUILD_CONTEXT }}
file: ${{ inputs.DOCKERFILE_PATH }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
run: |
echo "JAMSOCKET_API_TOKEN: ${{ inputs.JAMSOCKET_API_TOKEN }}"
echo "IMAGE_NAME: ${{ inputs.IMAGE_NAME }}"
echo "DOCKER_BUILD_CONTEXT: ${{ inputs.DOCKER_BUILD_CONTEXT }}"
echo "DOCKERFILE_PATH: ${{ inputs.DOCKERFILE_PATH }}"

0 comments on commit b151202

Please sign in to comment.