Difference between revisions of "Github.sha"
Jump to navigation
Jump to search
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{lc}} | {{lc}} | ||
+ | <pre> | ||
+ | - name: Login to Amazon ECR | ||
+ | id: login-ecr | ||
+ | uses: aws-actions/amazon-ecr-login@v1 | ||
+ | # - name: Build, tag, and push image to Amazon ECR | ||
+ | # id: build-image | ||
+ | # env: | ||
+ | # ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | ||
+ | # IMAGE_TAG: ${{ github.sha }} | ||
+ | # run: | | ||
+ | # # Build a docker container and | ||
+ | # # push it to ECR so that it can | ||
+ | # # be deployed to ECS. | ||
+ | # docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . | ||
+ | # docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | ||
+ | # echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT | ||
+ | </pre> | ||
+ | == See also == | ||
+ | * [[GitHub Actions variables]] | ||
* {{GHA}} | * {{GHA}} | ||
+ | |||
+ | [[Category:GitHub Actions]] |
Latest revision as of 13:21, 16 February 2024
- name: Login to Amazon ECR id: login-ecr uses: aws-actions/amazon-ecr-login@v1 # - name: Build, tag, and push image to Amazon ECR # id: build-image # env: # ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} # IMAGE_TAG: ${{ github.sha }} # run: | # # Build a docker container and # # push it to ECR so that it can # # be deployed to ECS. # docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . # docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG # echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
See also[edit]
- GitHub Actions variables
- GitHub Actions,
act, .github/workflows/
,~/actions-runner/
,svc.sh
,deploy:, run:, runs-on:
,uses:
,steps:
,jobs:
,on:, env:, uses:, script:, continue-on-error:, template:, aws-actions, inputs:
,GITHUB_ENV, needs:, github.
, GitHub runner, my-docker-publish.yml, GitHub Actions variables, GitHub Actions contexts, GitHub Actions Importer, If:, SLSA, Actions Runner Controller (ARC),$GITHUB OUTPUT
,notify:
, Marketplace,GITHUB_TOKEN
Advertising: